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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Best way to style a code block


Go to End


2 Posts   1970 Views

Avatar
ianpiper

Community Member, 32 Posts

13 November 2009 at 7:27am

If I code a site by hand and wanted to show a code listing I would normally use a div calling a class showing the background and border, and have descendant p styles for the code, bold code and so on.

In the TinyMCE editor in SilverStripe, how do I get such styles to show up in the Format or Style dropdowns?

Ian.
--

Avatar
juandavidgc

Community Member, 36 Posts

13 November 2009 at 7:46am

Hi ianpiper!

If you want to list clases (CSS) in the Styles dropdown in TinyMCE editor, you need to put them in the editor.css in your Theme folder.

-YourTheme
-CSS
editor.css(*)
layout.css
...
-Images
-Templates

Good luck!