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.

Customising the CMS /

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

Issue with HtmlEditorField and typography class in CMS

Go to End



Community Member, 181 Posts

18 June 2010 at 4:45pm

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.