Ckeditor removes table tags

旧城冷巷雨未停 提交于 2019-12-23 10:58:21

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/19046027/ckeditor-removes-table-tags

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!