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.

Customising the CMS /

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

TinyMCE configuration, add style select


Go to End


4 Posts   3666 Views

Avatar
snaip

Community Member, 181 Posts

7 February 2011 at 11:07pm

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

Community Member, 141 Posts

8 February 2011 at 2:00am

Edited: 08/02/2011 2:01am

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

Community Member, 181 Posts

8 February 2011 at 3:55am

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

Avatar
Invader_Zim

Community Member, 141 Posts

8 February 2011 at 4:46am

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