ckeditor 粘贴样式不能显示
CKEDITOR.config.pasteFilter=null; //粘贴过滤器设置为null 即可
CKEDITOR.config.allowedContent = {//内容规则 允许的标签
$1: {
// Use the ability to specify elements as an object.
elements: CKEDITOR.dtd,
attributes: true,
styles: true,
classes: true
}
};
CKEDITOR.config.disallowedContent = 'script; *[on*];img{width,height};img[width,height]';//内容规则 不允许的标签
pasteFilter : String
'plain-text'
– Content will be pasted as a plain text.'semantic-content'
– Known tags (exceptdiv
,span
) with all attributes (exceptstyle
andclass
) will be kept.'h1 h2 p div'
– Custom rules compatible with CKEDITOR.filter.null
– Content will not be filtered by the paste filter (but it still may be filtered by Advanced Content Filter). This value can be used to disable the paste filter in Chrome and Safari, where this option defaults to'semantic-content'
.