问题
Here is my scenario; I want to be able to create content like:
<div class="a">
<a href="someurl"><img src="somepic"></a>
</div>
However TinyMCE strips it to
<div class="a">
<img src="somepic">
</div>
Thanks!
回答1:
I resolved this with: convert_urls : false, remove_script_host : false, verify_html: false, valid_children : "+a[div|h1|h2|h3|h4|h5|h6|p|#text]",
:)
来源:https://stackoverflow.com/questions/18444300/how-to-configure-tinymce-to-allow-a-block-level-elements-inside-anchor-tags