Tinymce - 固定标签内的代码 - 什么是配置设置

时间:2015-11-10 12:32:45

标签: html css tinymce

我有以下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将其更改为:

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

解决此问题的正确配置设置是什么。

1 个答案:

答案 0 :(得分:2)

只需将以下属性添加到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]",