diff --git a/sources/application/UI/Base/Component/Input/RichText/RichText.php b/sources/application/UI/Base/Component/Input/RichText/RichText.php index a05c4e5b3..e8edcbdbc 100644 --- a/sources/application/UI/Base/Component/Input/RichText/RichText.php +++ b/sources/application/UI/Base/Component/Input/RichText/RichText.php @@ -18,6 +18,15 @@ class RichText extends UIBlock public const BLOCK_CODE = 'ibo-richtext'; public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/input/richtext/layout'; public const DEFAULT_JS_TEMPLATE_REL_PATH = 'base/components/input/richtext/layout'; + public const DEFAULT_JS_FILES_REL_PATH = [ + 'js/ckeditor/ckeditor.js', + 'js/ckeditor/adapters/jquery.js', + 'js/ckeditor/plugins/codesnippet/lib/highlight/highlight.pack.js', + ]; + public const DEFAULT_CSS_FILES_REL_PATH = [ + 'js/ckeditor/plugins/codesnippet/lib/highlight/styles/obsidian.css', + ]; + /** @var string */ protected $aConfig; diff --git a/sources/application/WebPage/iTopWebPage.php b/sources/application/WebPage/iTopWebPage.php index 758508de9..f2800b07b 100644 --- a/sources/application/WebPage/iTopWebPage.php +++ b/sources/application/WebPage/iTopWebPage.php @@ -38,8 +38,9 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage /** @inheritDoc */ protected const COMPATIBILITY_LINKED_SCRIPTS_REL_PATH = [ // Moved files + // - TabContainer 'js/jquery.ba-bbq.min.js', - + // - DashletGroupBy & other specific places 'js/d3.js', 'js/c3.js', @@ -50,6 +51,8 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage ]; /** @inheritDoc */ protected const COMPATIBILITY_LINKED_STYLESHEETS_REL_PATH = [ + // Moved files + // - DashletGroupBy & other specific places 'css/c3.min.css', ]; @@ -148,9 +151,12 @@ class iTopWebPage extends NiceWebPage implements iTabbedPage $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-ui-timepicker-addon.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery-ui-timepicker-addon-i18n.min.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/utils.js'); + + // Note: CKEditor files can't be moved easily as we need to find a way to init the "disabler" plugin, {@see js/toolbox.js} $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/ckeditor/ckeditor.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/ckeditor/adapters/jquery.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/ckeditor/plugins/codesnippet/lib/highlight/highlight.pack.js'); + $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'node_modules/@popperjs/core/dist/umd/popper.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'node_modules/tippy.js/dist/tippy-bundle.umd.js'); $this->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/property_field.js');