fix loading of ckeditor

This commit is contained in:
acognet
2021-09-30 12:01:48 +02:00
parent cddbe27182
commit 62be3f9f58

View File

@@ -58,6 +58,8 @@ class WebResourcesHelper
*/
public static function EnableCKEditorToWebPage(WebPage &$oPage): void
{
//when ckeditor is loaded in ajax, CKEDITOR_BASEPATH is not well defined (this constant is used to load additional js)
$oPage->add_script("if (! window.CKEDITOR_BASEPATH) { const CKEDITOR_BASEPATH = '".utils::GetAbsoluteUrlAppRoot()."js/ckeditor/';}");
foreach (static::GetJSFilesRelPathsForCKEditor() as $sFile) {
$oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().$sFile);
}