当我在tinymce编辑器中插入html代码时,我的标签被这个编辑器删除了。
如何在tinymce编辑器中允许此标签。
<ul>
<li>
<div class="list-top">
<figure>1</figure>
<div class="list-top-right">
<h3>It's Competitive Out There</h3>
</div>
</div>
</li>
</ul>
它转换成
<ul>
<li>
<div class="list-top">
1
<div class="list-top-right">
<h3>It's Competitive Out There</h3>
</div>
</div>
</li>
</ul>
只需删除此 <figure>1</figure>
标签
最佳答案
在jquery中使用.html()
$("ul li").html(function(i,h){
return h.replace(/<figure>/g,'').replace(/<\/figure>/g,'');
});
关于javascript - 如何在tinymce编辑器中允许一些自定义标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27225638/