How do I remove <br>
tags from ckeditor? I am using standard feature of ck editor and code using in config file as given below
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
};
I would use CKEDITOR.config.disallowedContent
Docs , more docs and small demo
For example, this should work:
config.disallowedContent = 'br';
Hope it helps!
Edit: Here is another good doc page with examples
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.