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.


Our old forums are still available as a read-only archive.

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

Using CSS classes in the editor


5 Posts   1304 Views


8 November 2008 at 3:03am Community Member, 9 Posts


I've been looking at the site editing demo video and SilverStripe looks really good although I haven't noticed the ability to apply CSS classes to the content without the need to go into HTML mode and manually add the class.

Is there a way to hook up a stylesheet to the editor so that an end user could say highlight some text and assign a class important and it surrounds it with a div or span with that class or adds the class to the container if it is a paragraph for example?

If not, do you think that this is a useful bit of functionality or was it intentionally left out? How would you go about allowing users a bit more formatting freedom that just using heading tags etc?




8 November 2008 at 5:36am Community Member, 470 Posts

Download the latest SVN copy and play around with that. The next release 2.3 has upgraded tiny_mce to the latest version and makes doing this type of thing easier. I know what you're asking is a very brought up question, and is suppose to be made easier with the next release of SS.

2.3 should be out by the end of Nov. the last I read.


10 November 2008 at 3:29pm Forum Moderator, 5511 Posts

Yea if you download the latest daily build or trunk via subversion it has a cool feature were it parses your typography.css file for class's and builds a dropdown list of available class's for use.


10 November 2008 at 9:30pm 121 Posts

Now that _is_ a cool feature.


10 November 2008 at 9:45pm Community Member, 470 Posts

Nice. Glad this is finally in. I know it was possible with the older version of tinymce, as a different CMS I use has it as a feature.

But hey, I'm just stoked it's in now :)