How to Rid of Large Spacing in CKEditor?

后端 未结 2 867
无人共我
无人共我 2021-02-07 08:43

\"enter

I installed CKEditor, i found it causes large space between lines even though i\'m

2条回答
  •  抹茶落季
    2021-02-07 09:34

    You can set in your config.js to use a
    instead of

    while hitting the ENTER key:

    config.enterMode = CKEDITOR.ENTER_BR;
    

    The available flags are

    CKEDITOR.ENTER_P (1) – new 

    paragraphs are created; CKEDITOR.ENTER_BR (2) – lines are broken with
    elements; CKEDITOR.ENTER_DIV (3) – new

    blocks are created.

    Look on the docs for enterMode for further details


    Expanding on Josepth Silber answer (that he know deleted.. He suggested using config.autoParagraph = false; ), IIRC (the Manual is not really clear on what create wrapping blocks around inline contents means), the autoParagraph config adds a

    pair around each inline content inside the body. So, even if you hit Enter on an empty line, it will generate

    (or

     

    , if so configured). The manual suggest leaving that option as it is, though (so set to true);

提交回复
热议问题