BUG Fix themed editor.css url not being resolved properly

This commit is contained in:
Damian Mooyman 2018-01-16 16:25:17 +13:00
parent 5a18c3c405
commit ca2fe3b1f6
No known key found for this signature in database
GPG Key ID: 78B823A10DE27D1A

View File

@ -631,11 +631,10 @@ class TinyMCEConfig extends HTMLEditorConfig
// Add standard editor.css
$editorCSSFiles = $this->config()->get('editor_css');
$resourceLoader = ModuleResourceLoader::singleton();
if ($editorCSSFiles) {
foreach ($editorCSSFiles as $editorCSS) {
$path = ModuleResourceLoader::singleton()
->resolveURL($editorCSS);
$editor[] = Director::absoluteURL($path);
$editor[] = $resourceLoader->resolveURL($editorCSS);
}
}
@ -643,7 +642,7 @@ class TinyMCEConfig extends HTMLEditorConfig
$themes = HTMLEditorConfig::getThemes() ?: SSViewer::get_themes();
$themedEditor = ThemeResourceLoader::inst()->findThemedCSS('editor', $themes);
if ($themedEditor) {
$editor[] = Director::absoluteURL($themedEditor);
$editor[] = $resourceLoader->resolveURL($themedEditor);
}
return $editor;