From 8cee9e07da55f5f5df6a854b53f923b4bcfdf1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Gr=C3=B6ger?= Date: Tue, 30 May 2023 08:59:18 +0200 Subject: [PATCH] InvalidArgumentException, module can't be found, looking to fix --- _config/editor.yml | 4 ++++ src/Forms/CodeEditorField.php | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 _config/editor.yml 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); }