mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: Fix default inclusion of (theme|project)/css/editor.css into the WYSWIWYG editor.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@94350 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2eea820daf
commit
f17dd0c37e
@ -23,7 +23,6 @@ HtmlEditorConfig::get('cms')->setOptions(array(
|
|||||||
'priority' => '50',
|
'priority' => '50',
|
||||||
'mode' => 'none',
|
'mode' => 'none',
|
||||||
'language' => i18n::get_tinymce_lang(),
|
'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',
|
'body_class' => 'typography',
|
||||||
'document_base_url' => Director::absoluteBaseURL(),
|
'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]"
|
'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('media', 'fullscreen');
|
||||||
HtmlEditorConfig::get('cms')->enablePlugins(array('ssbuttons' => '../../../cms/javascript/tinymce_ssbuttons/editor_plugin_src.js'));
|
HtmlEditorConfig::get('cms')->enablePlugins(array('ssbuttons' => '../../../cms/javascript/tinymce_ssbuttons/editor_plugin_src.js'));
|
||||||
|
|
||||||
|
@ -154,6 +154,19 @@ class LeftAndMain extends Controller {
|
|||||||
// Set the members html editor config
|
// Set the members html editor config
|
||||||
HtmlEditorConfig::set_active(Member::currentUser()->getHtmlEditorConfigForCMS());
|
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/typography.css');
|
||||||
Requirements::css(CMS_DIR . '/css/layout.css');
|
Requirements::css(CMS_DIR . '/css/layout.css');
|
||||||
Requirements::css(CMS_DIR . '/css/cms_left.css');
|
Requirements::css(CMS_DIR . '/css/cms_left.css');
|
||||||
|
Loading…
Reference in New Issue
Block a user