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.

Customising the CMS

TinyMCE configuration, add style select


Reply

4 Posts   2580 Views

Avatar
snaip

7 February 2011 at 11:07pm Community Member, 180 Posts

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

Avatar
Invader_Zim

8 February 2011 at 2:00am (Last edited: 8 February 2011 2:01am), Community Member, 141 Posts

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

Avatar
snaip

8 February 2011 at 3:55am Community Member, 180 Posts

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

Avatar
Invader_Zim

8 February 2011 at 4:46am Community Member, 141 Posts

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