Ckeditor adds empty paragraphs when applying a style

后端 未结 2 1717
名媛妹妹
名媛妹妹 2021-01-02 09:14

My CKEditor is adding a lot of unnecessary tags when applying a style to a selected paragraph

I initiate CKeditor with the following html:

2条回答
  •  失恋的感觉
    2021-01-02 10:03

    Or, if all fails, you can use the CSS selector pseudo-class ':empty' and give it a 'display:none'. In practice, you add this line to your CSS:

    p:empty {
      display:none
    }
    

    I understand it's a dirty solution but it works perfectly in most cases and has minimal inpact on design and functionality.

提交回复
热议问题