Ckeditor删除表格标签 [英] Ckeditor removes table tags

查看:95
本文介绍了Ckeditor删除表格标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用新的ckeditor升级了旧的ckeditor,只是我在为新的ckeditor的行为苦苦挣扎。



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



例如,从此输入中:

 < ; table> 
< tr>
< td>
这是测试
< / td>
< / tr>
< / table>

他会做到这一点:

 < p>这是一个测试< / p> 

我需要桌子,所以如何防止 ckeditor 替换我的桌子< table> 标记与< p> 标记?

解决方案

  config.toolbar = [
{名称:'插入',项目:['表格']}
];

请使用以上代码,如在新版ck编辑器中一样,您必须在工具栏中提及表格。 / p>

I've upgraded the old ckeditor with the new ckeditor, only I'm struggling with the behaviour of the new one.

It seems that the new one removes my complete table.

For example from this input:

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

he will make this:

<p>This is a test</p>

I need the table, so how can I prevent ckeditor to replace my <table> tags with a <p> tag?

解决方案

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

please use the above code as in new versions of ck editor you have to mention tables in toolbar.

这篇关于Ckeditor删除表格标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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