Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » TinyMCE configuration, add style select

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

Page: 1
Go to End
Author Topic: 2560 Views
  • snaip
    Avatar
    Community Member
    180 Posts

    TinyMCE configuration, add style select Link to this post

    Hi

    How to add options to style select ?

    Tried to
    HtmlEditorConfig::get('cms')->setOption(array('styleselect',array('first-style','second-style'));
    HtmlEditorConfig::get('cms')->modifyButtons('styleselect','1','0',array('fist-style','second-style'));

    but nothing happend

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: TinyMCE configuration, add style select Link to this post

    Hi snaip.

    Do you have a file called editor.css in the themes/<YourTheme>/css directory?
    If not, create one. The editor will use all the styles defined in this file for its style-select.

    Cheers,
    Christian

  • snaip
    Avatar
    Community Member
    180 Posts

    Re: TinyMCE configuration, add style select Link to this post

    wwoooooow !! great !!
    how did you know that and why i can't find it ? documentaction is still poor

  • Invader_Zim
    Avatar
    Community Member
    141 Posts

    Re: TinyMCE configuration, add style select Link to this post

    Whoopieeeh

    how did you know that and why i can't find it

    I can't remember... I think i have seen it on these forums somewhere, some time ago.
    And since then i always use a editor.css in my projects.

    Cheers,
    Christian

    2560 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.