Search code examples
tinymce

TinyMCE 6.0 forced root block option


I understand option forced_root_block will be removed from TinyMCE version 6.0. I use this option to avoid paragraphs (generate br tags instead of p tags).

  forced_root_block : false

How am I supposed to avoid white lines in the forthcoming version of TinyMCE?


Solution

  • I am not sure if this feature was already there at the time of this question but the newline behaviour option is the solution for me:

    newline behaviour: "linebreak"
    

    I wonder where this long time resistance against the br tag by the developer of TinyMCE comes from, because no one wants a new paragraph when using just one enter. Or having br replaced with paragraphs when you paste text from Notepad. Two br tags is another thing. In my scenario I convert two br tags into paragraphs after editing, to be able to style the white line height. Perhaps this approach does not fit in the philosophy of TinyMCE, where HTML inside and outside the editor should be seamless the same.