如何在ckeditor中粘贴excel表? [英] How to paste excel table in ckeditor?
本文介绍了如何在ckeditor中粘贴excel表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在ckeditor中粘贴excel表格?
How to paste excel table in ckeditor ?
在演示我可以粘贴格式化表,但在我的情况下,表格被粘贴为纯文本。我相信这是与ckeditor的配置有关,但找不到它。
我应该安装一些插件吗?
In the demo I'm available to paste formatted table but in my case the table is pasted as plain text. I believe it is something to do with the config of ckeditor but couldn't find it. Should I install some plugins ?
我在 config.js
CKEDITOR.editorConfig = function(config) {
config.pasteFromWordPromptCleanup = false;
config.pasteFromWordRemoveFontStyles = false;
config.forcePasteAsPlainText = false;
config.ignoreEmptyParagraph = false;
config.removeFormatAttributes = false;
};
提前感谢。
推荐答案
几个小时后,我找到了一个解决方案。看起来所有的html都被删除了,不仅仅是表。
After several hours I found a solution. it seems that all html was removed, not only tables.
我把它添加到config.js:
I added this to the config.js :
CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
CKEDITOR.config.forcePasteAsPlainText = false; // default so content won't be manipulated on load
CKEDITOR.config.basicEntities = true;
CKEDITOR.config.entities = true;
CKEDITOR.config.entities_latin = false;
CKEDITOR.config.entities_greek = false;
CKEDITOR.config.entities_processNumerical = false;
CKEDITOR.config.fillEmptyBlocks = function (element) {
return true; // DON'T DO ANYTHING!!!!!
};
这篇关于如何在ckeditor中粘贴excel表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文