CKEditor - 如何禁用pastefromword

时间:2011-12-05 17:30:40

标签: ckeditor

这个正在杀了我。我一个小时都找不到解决方案。问题是 - 如何在CKEditor中完全禁用pastefromword?我希望粘贴的文本很简单 - 根本不编辑。

提前致谢。

5 个答案:

答案 0 :(得分:7)

在ckeditor / config.js中,使用:

config.forcePasteAsPlainText = true;

有关详情:http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html

答案 1 :(得分:3)

选择文件CKEditor \ CKEditor.js

寻找关键字“ i.toolbar_Full

操纵以下代码块来添加,禁用或更改图标的位置

i.toolbar_Full=[['Source','-','Save','NewPage','Preview','-','Templates'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['BidiLtr','BidiRtl'],['Link','Unlink','Anchor'],['Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];

答案 2 :(得分:2)

尝试使用此代码(config.js)

config.removePlugins = 'PasteFromWord';

它对你有帮助......

答案 3 :(得分:1)

有你去......

config.removeButtons = 'PasteFromWord';

将该行代码添加到底部的config.js文件中。

答案 4 :(得分:0)

在config.js文件中使用以下行:

config.pasteFromWord=true;
config.pasteFromWordRemoveFontStyles = true;
config.pasteFromWordNumberedHeadingToList =true;