Whenever I'm adding HTML contents via CKEditor it automatically appends a "br" tag at the end of each other html tags.
How can I remove it?
CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR;
CKEDITOR.config.shiftEnterMode = CKEDITOR.ENTER_P;
CKEDITOR.replace(elemId,
{
resize_enabled: false,
entities: false,
basicEntities: false,
entities_greek: false,
entities_latin: false,
}
Don't remove them!
They are there because the contenteditable
implementation in Firefox (and I think other non-ie browsers needs them to be there in order to render the elements properly, and allow the caret to be placed in them.
CKeditor's export functions should automatically remove them from the markup, you I wouldn't worry about them unless they are causing a specific problem while you are editing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With