mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX #5255 LeftAndMain should include the correct editor.css file so typography from user selected theme in SiteConfig is shown in TinyMCE
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@102038 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1d259855c3
commit
963fd45c91
@ -162,7 +162,17 @@ class LeftAndMain extends Controller {
|
||||
$htmlEditorConfig = HtmlEditorConfig::get_active();
|
||||
if(!$htmlEditorConfig->getOption('content_css')) {
|
||||
$cssFiles = 'cms/css/editor.css';
|
||||
if(SSViewer::current_theme()) $cssFiles .= ', ' . THEMES_DIR . "/" . SSViewer::current_theme() . '/css/editor.css';
|
||||
|
||||
// Use theme from the site config
|
||||
if(($config = SiteConfig::current_site_config()) && $config->Theme) {
|
||||
$theme = $config->Theme;
|
||||
} elseif(SSViewer::current_theme()) {
|
||||
$theme = SSViewer::current_theme();
|
||||
} else {
|
||||
$theme = false;
|
||||
}
|
||||
|
||||
if($theme) $cssFiles .= ', ' . THEMES_DIR . "/{$theme}/css/editor.css";
|
||||
else if(project()) $cssFiles .= ', ' . project() . '/css/editor.css';
|
||||
|
||||
$htmlEditorConfig->setOption('content_css', $cssFiles);
|
||||
|
Loading…
Reference in New Issue
Block a user