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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

Can set TinyMCE styles in SS3.0.2


Go to End


5 Posts   1395 Views

Avatar
klikhier

Community Member, 150 Posts

6 November 2012 at 5:01am

I have defined this in _config.php in my SS3.0.2 install:

HtmlEditorConfig::get('cms')->setOption('theme_advanced_styles','Button=btn');

It doesn't seem to work in the latest SS3.0.2. Is this a bug? If so, where should I report this?

Avatar
haantje72

Community Member, 69 Posts

6 November 2012 at 8:25am

havnt used that one but i just do it with the following in _config.php

htmlEditorConfig::get('cms')->insertButtonsAfter('formatselect', 'fontsizeselect', 'media', 'fullscreen', 'code');
HtmlEditorConfig::get('cms')->insertButtonsAfter('fontsizeselect', 'forecolor');
HtmlEditorConfig::get('cms')->setOption('verify_html', 'false');
HtmlEditorConfig::get('cms')->setOption('apply_source_formatting', 'false');
HtmlEditorConfig::get('cms')->setOption('theme_advanced_styles', 'highlight=highlight;no-border=no-border,break=break');

dont know if this is what youre looking for?

Avatar
klikhier

Community Member, 150 Posts

6 November 2012 at 8:55pm

Ehm, apart from different options, I don't see any differences:

My post:
HtmlEditorConfig::get('cms')->setOption('theme_advanced_styles','Button=btn');

Your post:
HtmlEditorConfig::get('cms')->setOption('theme_advanced_styles', 'highlight=highlight;no-border=no-border,break=break');

Does this work in your SS302 install?

Avatar
haantje72

Community Member, 69 Posts

10 November 2012 at 11:34pm

HtmlEditorConfig::get('cms')->setOption('theme_advanced_styles', 'highlight=highlight;no-border=no-border,break=break');
seems to work in my install without probs.
I use the latest versions from github cms and framework

Avatar
klikhier

Community Member, 150 Posts

20 November 2012 at 7:33am

I fixed this by downloading latest ZIPs (cms + framework) from github. Thanks.