如何在tinymce编辑器中允许一些自定义标签 [英] How to allow some custom tag in tinymce editor

查看:2394
本文介绍了如何在tinymce编辑器中允许一些自定义标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在tinymce编辑器中添加html代码时,我的<图> 标签被此编辑器删除.

when i pest a html code inside tinymce editor my < figure> tag remove by this editor.

如何在tinymce编辑器中允许该标签.

how to allow this tag in tinymce editor.

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

推荐答案

您需要告诉TinyMCE将figure视为有效元素.

You need to tell TinyMCE to treat figure as valid element.

使用此选项: http://www.tinymce.com/wiki.php/配置:extended_valid_elements

这篇关于如何在tinymce编辑器中允许一些自定义标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆