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.

Archive /

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

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

Using CSS classes in the editor

Go to End

5 Posts   1619 Views


Community Member, 9 Posts

8 November 2008 at 3:03am


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?




Community Member, 470 Posts

8 November 2008 at 5:36am

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.


Forum Moderator, 5523 Posts

10 November 2008 at 3:29pm

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.


121 Posts

10 November 2008 at 9:30pm

Now that _is_ a cool feature.


Community Member, 470 Posts

10 November 2008 at 9:45pm

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 :)