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'
.