CKEditor 很好,但它去掉了所有的 html 标签和 css。这是因为他们新的高级内容过滤器。它破坏了我所有的网页布局。
我尝试禁用它,config.js
但没有任何区别,我整天都在搞砸这个,并尝试了以下代码的许多变体。任何人都可以发现任何明显的错误config.js
CKEDITOR.editorConfig = function( config ) {
config.allowedContent = true;
// The toolbar groups arrangement, optimized for a single toolbar row.
config.toolbarGroups = [
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
{ name: 'links' },
{ name: 'insert' },
{ name: 'styles' },
{ name: 'colors' },
];
// The default plugins included in the basic setup define some buttons that
// we don't want too have in a basic editor. We remove them here.
config.removeButtons = 'Cut,Copy,Paste,Undo,Redo,Anchor,Underline,Strike,About,Others,Forms';
// Let's have it basic on dialogs as well.
config.removeDialogTabs = 'link:advanced';
};