Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Chris Smith 25 posts 127 karma points
    Jan 24, 2017 @ 09:38
    Chris Smith

    RTE is Stripping classes from div's

    Hi folks.

    This seems to be a recurring battle I have with TinyMCE which is starting to get quite annoying.

    On our intranet an editor has asked to put some content into an accordion. Easy I thought, paste in and edit the dummy text with your own and away you go.

    However, the RTE in both standard and grid forms is stripping out all the bootstrap gubbins from the divs, leaves it perfectly intact on the a's though.

    My TinyMCE config had already been updated to;

    +div[id|dir|class, and

    +a[id|rel|data-id|rev|charset|hreflang|dir|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur|onclick| ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],

    this worked fine for things like 'bootstrap alerts' I've since changed the div entry to div[id|dir|class and #div[id|dir|class, as I had read something about TinyMCE being fussy with empty tags although is a Div in a Div technically empty?!

    As I'm working on my local dev machine after each change I've rebuilt the solution, refreshed the app pool and have touched the web.config for good measure as well so I think the changes should have registered.

    I don't want to turn off HTMLTidy as there's always an editor that knew a bit of html from 15 years ago that'll start rainbowing all the text on their pages!

    Has anyone been able to a way to stop TinyMCE stripping stuff from divs?

  • Chris Smith 25 posts 127 karma points
    6 days ago
    Chris Smith

    A bit of a bump as this is still a daily problem. Anyone got a work around for this?

    Would like to be able to wrap tables in bootstrap's responsive-table class but TinyMCE isn't having any of it.



Please Sign in or register to post replies

Write your reply to: