This project is read-only.

Html Widget Editor Stripping tags

Feb 11, 2011 at 3:09 PM


I am trying to insert this as a html widget.


<div class="tree-container">
	<figure class="tree">
		<div class="image leaves-back"></div>
		<div class="image lemur2-leg"></div>
		<div class="image trunk"></div>
		<div class="image leaves"></div>
		<div class="image lemur1"></div>
		<div class="image lemur2"></div>


The editor immediately strips the empty div's leaving only the container. If I add nbsp character in each on they remain. So we have the below.

<div class="tree-container">
	<figure class="tree">
		<div class="image leaves-back">&nbsp;</div>
		<div class="image lemur2-leg">&nbsp;</div>
		<div class="image trunk">&nbsp;</div>
		<div class="image leaves">&nbsp;</div>
		<div class="image lemur1">&nbsp;</div>
		<div class="image lemur2">&nbsp;</div>

But the figure element gets stripped every time.

Possibly a bug? I don't like the editor tampering with my mark-up at all. If you are an advanced enough user to click the raw html view it should just leave it alone IMO.



Feb 11, 2011 at 7:34 PM

That's TinyMCE. There are ways you can tell it to leave a list of tags alone, but another thing you can do is go into content-types, click edit next to the html widget type, deploy the body part and change the setting from html to text. This will suppress TinyMCE and replace it with a plain textbox.