Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Changing p and h1 tags in the page editor

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

Page: 1
Go to End
Author Topic: 1171 Views
  • JoelMurdoch
    Avatar
    Community Member
    16 Posts

    Changing p and h1 tags in the page editor Link to this post

    Hi everybody,

    I am having a world of trouble trying to make the h1 and p tags show in the page editor in the same style they do on the site. I tried editing the typography css file of my theme as another thread on this forum says, but it made no difference. I tried both a normal p definition and .typography p definition. Force refreshed the CSS to ensure it was in my browser's case, flushed the db... nothing.

    Any help greatly appreciated.
    Joel.

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: Changing p and h1 tags in the page editor Link to this post

    Hi Joel,

    You need an editor.css file, see here:
    http://doc.silverstripe.org/doku.php?id=css#wysiwyg_editor_stylesheet_typography.css_editor.css

    Hope it helps,
    Juan

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Changing p and h1 tags in the page editor Link to this post

    As far as I know, there's a bug in 2.3.4 that prevents the editor.css file from loading. So even if you have the editor.css file, it might not get loaded still.
    To fix this, add the following line to mysite/_config.php

    HtmlEditorConfig::get('cms')->setOption('content_css', 'cms/css/editor.css, mysite/css/editor.css');

    The red colored part is where you specify the path to your editor.css file

  • JoelMurdoch
    Avatar
    Community Member
    16 Posts

    Re: Changing p and h1 tags in the page editor Link to this post

    OK. So what is the difference between the typography css and the editor css? I tried editing the former which is loaded on the editor pages (you can see it in the source code), but it did not seem to be helping.

    Is the typography set of classes the ones I need to be editing or is there something else? Because it did not work out editing them in the typography one and I cannot see how trying to change it with a different CSS. I am not trying to be argumentative here, just looking for clarification.

    Thanks

  • JoelMurdoch
    Avatar
    Community Member
    16 Posts

    Re: Changing p and h1 tags in the page editor Link to this post

    Anybody?

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