1
如何删除特定CK编辑器实例的样式。 我的页面中有两个CKEditor。一个限制于摘要而另一个限制内容。CKEditor删除特定实例的样式
对于总结,我不能允许复制粘贴样式,因为这可能会混淆我们的设计。
我试过这个解决方案:
CKEDITOR.config.forcePasteAsPlainText = true;
CKEDITOR.replace(id, {
// Define the toolbar groups as it is a more accessible solution.
toolbarGroups: [
{"name":"basicstyles","groups":["basicstyles"]},
{"name":"links","groups":["links"]}
],
// Remove the redundant buttons from toolbar groups defined above.
removeButtons: 'Strike,Subscript,Superscript,Anchor,Styles,Specialchar'
});
这消除了造型,但是从内容也删除。
所以我的问题是如何在我粘贴摘要时删除样式,以及在粘贴内容时如何保持样式。