Tinymce - chenges code inside anchor tag - what are configration settings

China☆狼群 提交于 2019-12-12 12:51:06

问题


I have following piece of HTML

<a href="#" class="list-feature__link"><img class="left" src="images/list/sell_off.svg" />
<div class="list-feature__text">
<h4>Sell your design</h4>
<p>Lorem ipsum dolor sit amen lorem</p>                                     </div>
</a>

Tinymce changes it to :

<a href="#" class="list-feature__link"><img class="left" src="images/list/sell_off.svg" /></a>
<div class="list-feature__text">
<h4>Sell your design</h4>
<p>Lorem ipsum dolor sit amen lorem</p>
</div>

what are the correct configration setting for tinymce to resolve this problem.


回答1:


Just add following property into you TinyMce Configration

valid_children:"+a[elements to allow inside a]",
valid_children:"+a[div|i|span|img|p|ul|ol|li|h1|h2|h3|h4|h5|h5|h6]",


来源:https://stackoverflow.com/questions/33630082/tinymce-chenges-code-inside-anchor-tag-what-are-configration-settings

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