Jump to:

23360 Posts in 18124 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Best way to style a code block

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

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

Page: 1
Go to End
Author Topic: 1111 Views
  • ianpiper
    Avatar
    Community Member
    32 Posts

    Best way to style a code block Link to this post

    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.
    --

  • juandavidgc
    Avatar
    Community Member
    36 Posts

    Re: Best way to style a code block Link to this post

    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!

    1111 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.