首页 文章

Ckeditor删除表标签

提问于
浏览
5

我用新的ckeditor升级了旧的fckeditor,只是我在努力应对新的行为 .

似乎新的删除了我的完整表格:

例如,他将从这个输入

<table>
    <tr>
        <td>
            This is a test
        </td>
    </tr>
</table>

这个:

<p>This is a test</p>

我需要这个表,那么如何防止ckeditor用 <p> 标签替换我的 <table> 标签?

1 回答

  • 6
    config.toolbar = [
        { name: 'insert', items: [ 'Table' ] }
    ];
    

    请使用上面的代码,因为在新版本的ck编辑器中你必须提到工具栏中的表格 .

相关问题