问题
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