Ckeditor adds empty paragraphs when applying a style

后端 未结 2 1701
名媛妹妹
名媛妹妹 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 09:36

    You might want to consider these:

    config.enterMode = CKEDITOR.ENTER_BR;
    config.autoParagraph = false;
    

    You can check out my post here for more info:
    How to configure ckeditor to not wrap content in

    block?

    The following config setting will stop the editor from inserting a non-breaking space in empty paragraphs:

      config.fillEmptyBlocks = false;
    


    Was all of the additional code inserted after applying just one style?
    What style did you apply, is all the extra code inserted regardless of the style you use?
    What happens if you select the text and click the bold button?
    Is the code you are showing being copied from the source view of the editor or from the final page that you use to display your content?

    Be Well,
    Joe

提交回复
热议问题