insert line break instead of

in TinyMCE

前端 未结 8 1784
难免孤独
难免孤独 2021-02-04 07:55

I have initialised TinyMCE as follows. I want to force line breaks when user presses enter and not the paragraphs. I\'m trying following, but not working. I\'m using TinyMCE ve

8条回答
  •  不知归路
    2021-02-04 08:32

    What worked for me was:

    tinymce.init({
        ...
        force_br_newlines : true,
        force_p_newlines : false,
        forced_root_block : ''
    });
    

    Each linebreak is producing br tag with these settings.

    SOURCE: http://www.tinymce.com/wiki.php/Configuration3x:force_br_newlines

提交回复
热议问题