簡體   English   中英

如何刪除ckeditor中的br標簽?

[英]How to remove br tags in ckeditor?

如何從ckeditor中刪除<br>標簽? 我正在使用ck編輯器的標准功能和在配置文件中使用的代碼,如下所示

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

};  

我會使用CKEDITOR.config.disallowedContent

文件更多文件小型示范

例如,這應該工作:

config.disallowedContent = 'br';

希望能幫助到你!

編輯: 是另一個帶有示例的好文檔頁面

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM