Commit 6c9690ae authored by Tino Goratsch's avatar Tino Goratsch

fix the CKEditor

parent 97f463a9
......@@ -35,8 +35,12 @@ class Helpers
{
$path = ComponentRegistry::getPathByName(Schema::MODULE_NAME);
return $this->appPath->getWebRoot()
. $this->appPath->getWebRoot() . \substr($path, \strlen(ACP3_ROOT_DIR . DIRECTORY_SEPARATOR))
. '/Resources/Assets/rich-filemanager/index.html';
return \str_replace(
'\\',
'/',
$this->appPath->getWebRoot()
. \substr($path, \strlen(ACP3_ROOT_DIR . DIRECTORY_SEPARATOR))
. '/Resources/Assets/rich-filemanager/index.html'
);
}
}
......@@ -182,9 +182,13 @@ class CKEditor extends Textarea
// Add custom plugins
$path = ComponentRegistry::getPathByName('wysiwygckeditor');
$ckeditorPluginsDir = $this->appPath->getWebRoot()
. $this->appPath->getWebRoot() . \substr($path, \strlen(ACP3_ROOT_DIR . DIRECTORY_SEPARATOR))
. 'Resources/Assets/js/ckeditor/plugins/';
$ckeditorPluginsDir = \str_replace(
'\\',
'/',
$this->appPath->getWebRoot()
. \substr($path, \strlen(ACP3_ROOT_DIR . DIRECTORY_SEPARATOR))
. '/Resources/Assets/js/ckeditor/plugins/'
);
$js = "CKEDITOR.plugins.addExternal('codemirror', '" . $ckeditorPluginsDir . "codemirror/');\n";
$js .= "CKEDITOR.plugins.addExternal('divarea', '" . $ckeditorPluginsDir . "divarea/');\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment