Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Content Editor Discussions /

Forum for content editors and CMS users.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

2.3.4. TinyMCE in CMS without custom editor.css


Go to End


3 Posts   2918 Views

Avatar
Devlin

Community Member, 344 Posts

4 December 2009 at 6:03am

Edited: 04/12/2009 7:44am

Hi there,

while upgrading from 2.3.3 to 2.3.4 I have noticed that my custom editor.css won't load anymore for TinyMCE in the CMS. So I have traced the problem and I found out that you moved HtmlEditorConfig::get('cms')->setOptions() from LeftAndMain to cms/_config. So the problem is that you actually check SSViewer::current_theme() before I call SSViewer::set_theme().

My solution so far is to simply set the content_css value again in my own _config but I guess this shouldn't be the point.

SSViewer::set_theme('myowntheme');
HtmlEditorConfig::get('cms')->setOptions(array(
  'content_css'=>'cms/css/editor.css, '.(SSViewer::current_theme() ? THEMES_DIR . "/" . SSViewer::current_theme() : project()) . "/css/editor.css"
));

But maybe I overlooked something.

Avatar
Platypus

Community Member, 43 Posts

4 December 2009 at 7:08am

Edited: 04/12/2009 10:01am

Yes, the editor.css doesn't load anymore in 2.3.4 :(
I'will try this workaround, but I think this shouldn't be the "official" way...

/edit: It works with your addition to the _config.php, thanks for posting this!

Avatar
Willr

Forum Moderator, 5523 Posts

4 December 2009 at 9:24am