N°3685 - UIBlock resources: Add CKEditor resources to RichText

This commit is contained in:
Molkobain
2021-09-10 11:52:57 +02:00
parent d2662e27e1
commit de5f47d43e
2 changed files with 16 additions and 1 deletions

View File

@@ -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;

View File

@@ -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');