ckeditor 粘貼樣式不能顯示

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]';//內容規則 不允許的標籤


 : String

  • 'plain-text' – Content will be pasted as a plain text.
  • 'semantic-content' – Known tags (except divspan) with all attributes (except style and class) 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'.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章