How to configure TinyMCE to allow a block-level elements inside anchor tags?

天涯浪子 提交于 2019-12-13 07:06:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!