mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: Fix default inclusion of (theme|project)/css/editor.css into the WYSWIWYG editor. (from r94350)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@95647 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b72d51ebbd
commit
760ee29f7c
@ -23,7 +23,6 @@ HtmlEditorConfig::get('cms')->setOptions(array(
|
||||
'priority' => '50',
|
||||
'mode' => 'none',
|
||||
'language' => i18n::get_tinymce_lang(),
|
||||
'content_css' => 'cms/css/editor.css, '.(SSViewer::current_theme() ? THEMES_DIR . "/" . SSViewer::current_theme() : project()) . "/css/editor.css",
|
||||
|
||||
'body_class' => 'typography',
|
||||
'document_base_url' => Director::absoluteBaseURL(),
|
||||
@ -41,7 +40,6 @@ HtmlEditorConfig::get('cms')->setOptions(array(
|
||||
'extended_valid_elements' => "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap],iframe[src|name|width|height|align|frameborder|marginwidth|marginheight|scrolling],object[width|height|data|type],param[name|value],map[class|name|id],area[shape|coords|href|target|alt]"
|
||||
));
|
||||
|
||||
|
||||
HtmlEditorConfig::get('cms')->enablePlugins('media', 'fullscreen');
|
||||
HtmlEditorConfig::get('cms')->enablePlugins(array('ssbuttons' => '../../../cms/javascript/tinymce_ssbuttons/editor_plugin_src.js'));
|
||||
|
||||
|
@ -160,6 +160,19 @@ class LeftAndMain extends Controller {
|
||||
|
||||
// Set the members html editor config
|
||||
HtmlEditorConfig::set_active(Member::currentUser()->getHtmlEditorConfigForCMS());
|
||||
|
||||
|
||||
// Set default values in the config if missing. These things can't be defined in the config
|
||||
// file because insufficient information exists when that is being processed
|
||||
$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';
|
||||
else if(project()) $cssFiles .= ', ' . project() . '/css/editor.css';
|
||||
|
||||
$htmlEditorConfig->setOption('content_css', $cssFiles);
|
||||
}
|
||||
|
||||
|
||||
Requirements::css(CMS_DIR . '/css/typography.css');
|
||||
Requirements::css(CMS_DIR . '/css/layout.css');
|
||||
|
Loading…
Reference in New Issue
Block a user