Content Studio alters HTML pasted in the HTML-editor

Enonic version: 7.0
OS: MacOS X

When we paste HTML (a large table) inn the HTML-editor i removes class-attributes and ads style.
The HTML pasted is valid and works fine if I insert it with Datatoolbox.
This must be a bug? Why would you alter the HTML pasted as long as it´s valid?

Also the HTML-editor is not showing if the HTMLArea is inside an item-set.

Hi, sorry for the delayed answer on this.

I’ve tested it now and the editor keeps class attribute on table element. It does strip class on table’s child elements, like tbody, tr and td, but having class on the table itself should be enough to target its child elements with CSS. The reason to limit the number of elements with class attribute is that custom classes may come in conflict with CSS classes in admin UI.

I’ve tested an HTML Area inside an item set as well - seems to be working fine (see screenshot below). Can you share your content type schema?

The issue with stripping out class attribute is now fixed in the last release of Content Studio. Full change log is here.

As mentioned, we couldn’t reproduce the issue with HTML Area inside an item-set. Please share your content type XML in a new post if you need help with this.

2 Likes