Of all the Joomla editors we've used, JCE has best suited our purposes and clients. But there's a few problems with the editor that can cause problems when we code something, then it's toggled to wysiwyg and the editor tries to 'fix' our perfectly valid html.
Before you go asking questions - yes, we've set it to allow all those elements JCE likes to restrict, and no, it is NOT set to validate / clean up the html. The only restrictions we have are for pasting content into the editor.
This will disappear on toggling editor and back. Replaced with:
<a id="hello" class="link">Hello</a>
<p><a id="hello" class="link"></a>Hello</p>
<a href="#"> <div> <h2>Our Work</h2> </div> </a>
<p><a href="#"></a></p> <div> <h2><a href="#">Our Work</a></h2> </div> <p> </p>
Now, we want to use id instead of name for our anchor, because it's valid under HTML5, whereas name technically is not. Also, in what universe is id an invalid assignment to a link?
Also, now that it's totally legit to wrap a div with links, why would JCE strip those out as well?
Is this just a setting I'm missing? Does anyone have any insight into how I can use the editor so that we can code as we need in the editor, but our clients can't wreck it simply by saving in wysiwyg?
Edit: I've tested this in chrome, firefox and safari. Don't think it's got anything to do with the browser.
Edit: I've tested this with the container settings. Both Paragraph Container & Paragraph on Enter and Div Container & Div on enter cause this. The other two, No container & Paragraph on enter, No Container & linebreak on enter, do not cause it. Problem is - I need the first setting! As much as it would be great to give clients the benefit of the doubt, they simply can't be trusted to follow instructions and add paragraph formatting to their text.
Confirmed: This also happens with TinyMCE.
So - we know what causes this - the Paragraph Container setting - now how do we get around it while keeping that setting alive?