public static function on_editor_load() { self::$settings = \GCore\Libs\Base::getSettings('editors'); if (self::$settings->get('active_editor', 'tinymce') == 'tinymce') { $doc = \GCore\Libs\Document::getInstance(); //$doc->_('jquery'); $doc->addJsFile(\GCore\C::get('GCORE_FRONT_URL') . 'extensions/editors/assets/tinymce/tinymce.min.js'); return true; } else { if (self::$settings->get('active_editor', 'tinymce') == 'ckeditor') { $doc = \GCore\Libs\Document::getInstance(); $doc->_('jquery'); $doc->addJsFile(\GCore\C::get('GCORE_FRONT_URL') . 'extensions/editors/assets/ckeditor/ckeditor.js'); return true; } else { if (self::$settings->get('active_editor', 'tinymce') == 'sceditor') { $doc = \GCore\Libs\Document::getInstance(); $doc->_('jquery'); $doc->addCssFile(\GCore\C::get('GCORE_FRONT_URL') . 'extensions/editors/assets/sceditor/themes/default.min.css'); $doc->addCssFile(\GCore\C::get('GCORE_FRONT_URL') . 'extensions/editors/assets/sceditor/jquery.sceditor.default.min.css'); $doc->addJsFile(\GCore\C::get('GCORE_FRONT_URL') . 'extensions/editors/assets/sceditor/jquery.sceditor.bbcode.min.js'); return true; } } } }