Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Issue with HtmlEditorField and typography class in CMS

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

Page: 1
Go to End
Author Topic: 805 Views
  • TotalNet
    Avatar
    Community Member
    181 Posts

    Issue with HtmlEditorField and typography class in CMS Link to this post

    Upgrading a site to 2.4.0 and noticed something odd. a minor thing to be fair but...

    The div containing tinyMCE (id = Content) now has an extra class of typography, and because my theme set's padding and margin on the typography class it's messing up the size and alignment in the CMS.

    It wasn't a problem in 2.3.x because the containing div did not have this class.

    I see that HtmlEditorField->Field() has changed quite a bit in 2.4.0, now calling addExtraClass() for example and we now end up with:

    <div id="Content" class="field htmleditor typography htmleditor">

    in addition to the textarea tag also having the attribute of typography.

    I've tried to trace the path back through TextAreaField and FormField but just ending up in circles, perhaps it's because it's 4.30pm on a Friday!

    Anyway, I'll try to get round this with extra CSS rules for now but I'm pretty sure this is not intended behaviour. Assuming you want the same styling on the containers and their form elements could get confusing.

    Cheers,

    Rich

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