Skip to content

bigfork/codeeditorfield

 
 

Repository files navigation

Code Editor Field for SilverStripe 4

Creates an Ace Code Editor (https://ace.c9.io/)

Installation

composer require jinjie/codeeditorfield

Usage

$fields->push(CodeEditorField::create('MyCode', 'Enter Source Code Here'));

Setting the Programming Language Mode

$fields->push($myCodeEditorField = CodeEditorField::create('MyCode', 'Enter Source Code Here'));

// set mode to html
$myCodeEditorField->setMode('ace/mode/html');
// or javascript
$myCodeEditorField->setMode('ace/mode/javascript');

see resources/thirdparty/ace for available modes (mode-{language}.js)

About

Code Editor Field for SilverStripe 5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 66.2%
  • JavaScript 23.7%
  • Scheme 10.1%