2016-07-23 175 views
2

如何從ckeditor中刪除<br>標籤?我使用的使用配置文件CK編輯器和代碼的標準特徵如下如何刪除ckeditor中的br標籤?

CKEDITOR.editorConfig = function(config) { 
     config.autoParagraph = false; 
    config.shiftEnterMode = CKEDITOR.ENTER_BR; 
    config.shiftEnterMode = CKEDITOR.ENTER_DIV; 

    // stops automatic insertion of <p> on focus 

    config.allowedContent = false; // don't filter my data 

}; 

回答

0

給出我會用CKEDITOR.config.disallowedContent

Docsmore docssmall demo

例如,這應該工作:

config.disallowedContent = 'br'; 

希望它有幫助!

編輯:Here是另一個很好的文檔頁面與例子