addCss('/modules/backend/formwidgets/codeeditor/assets/css/codeeditor.css', 'core'); $this->addJs('/modules/backend/formwidgets/codeeditor/assets/vendor/ace/ace.js', 'core'); $this->addJs('/modules/backend/formwidgets/codeeditor/assets/js/codeeditor.js', 'core'); $this->addJs('/modules/backend/assets/js/editorsettings/editorsettings.js', 'core'); BackendMenu::setContext('October.System', 'system', 'settings'); } public function index() { // Load the editor system settings $editorSettings = EditorSettingsModel::instance(); $this->vars['showGutter'] = true; $this->vars['theme'] = $editorSettings->theme; $this->vars['wrapWords'] = $editorSettings->word_wrap !== 'off'; $this->vars['fontSize'] = $editorSettings->font_size; $this->vars['tabSize'] = $editorSettings->tab_size; $this->vars['useSoftTabs'] = !$editorSettings->use_hard_tabs; $this->vars['margin'] = 0; $this->getClassExtension('Backend.Behaviors.FormController')->update(); $this->pageTitle = Lang::get('backend::lang.editor.menu_label'); } public function formFindModelObject() { return EditorSettingsModel::instance(); } }