I'm using TinyMCE 3.x and can't find the documentation for a problem I'm having.
If I use the html editor to add an empty element such as <div class="clearfix"></div>
or <span class="clearfix"></span>
, the editor removes these automatically.
Is there a way to tell it to stop stripping out empty elements?
I have found
extended_valid_elements : "#div, #span",
which almost fixes it. If I enable this and add <div class="clearfix"></div>
, it replaces it with <div> </div>
, so adds a space but removes the class.
the class
attribute seems to get stripped out, so try to make it valid like this:
extended_valid_elements : "#div[class], #span[class]"