Jump to:

5538 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Can set TinyMCE styles in SS3.0.2

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

Page: 1
Go to End
Author Topic: 668 Views
  • klikhier
    Avatar
    Community Member
    150 Posts

    Can set TinyMCE styles in SS3.0.2 Link to this post

    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?

  • haantje72
    Avatar
    Community Member
    69 Posts

    Re: Can set TinyMCE styles in SS3.0.2 Link to this post

    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?

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: Can set TinyMCE styles in SS3.0.2 Link to this post

    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?

  • haantje72
    Avatar
    Community Member
    69 Posts

    Re: Can set TinyMCE styles in SS3.0.2 Link to this post

    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

  • klikhier
    Avatar
    Community Member
    150 Posts

    Re: Can set TinyMCE styles in SS3.0.2 Link to this post

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

    668 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.