Well I have this problem, I made a few custom buttons to the tinyMCE wordpress editor to insert html so the user wouldn't get confused with shortcodes. Everything works relativly ok... but there is a button that wraps a anchor to a div.
<a name="buton" class="prod-button" href="some-href">
<div>
...
</div>
</a>
The problem is that when the content is inserted into the editor, the ancho is erased.
It is not a problem of the button, but it how tinyMCE is configurated I believe, because it also happens when I write the html directly in the editor
I've already done this and it didn't work
tinyMCE.init({
allow_html_in_named_anchor: true,
valid_children: '+a[div],+a[span],+a[img]',
extended_valid_elements : "a[*]",
});
Any ideas?