diff --git a/_config/editor.yml b/_config/editor.yml new file mode 100644 index 0000000..9c05483 --- /dev/null +++ b/_config/editor.yml @@ -0,0 +1,4 @@ +SilverStripe\Admin\LeftAndMain: + extra_requirements_javascript: + - 'kevingroeger/codeeditorfield: client/thirdparty/ace/ace.js' + - 'kevingroeger/codeeditorfield: client/javascript/CodeEditorField.js' diff --git a/src/Forms/CodeEditorField.php b/src/Forms/CodeEditorField.php index 3d79854..d8f5d6d 100644 --- a/src/Forms/CodeEditorField.php +++ b/src/Forms/CodeEditorField.php @@ -13,9 +13,6 @@ class CodeEditorField extends TextareaField public function Field($properties = []) { - Requirements::javascript('kevingroeger/codeeditorfield:client/thirdparty/ace/ace.js'); - Requirements::javascript('kevingroeger/codeeditorfield:client/javascript/CodeEditorField.js'); - $this->addExtraClass('codeeditorfield stacked'); return parent::Field($properties); }