tinymce adding p tags automatically?

后端 未结 4 1106
名媛妹妹
名媛妹妹 2020-12-13 23:57

Im using tinymce and saving it to a database.

When I edit the saved content using tinymce and save again, it inserts a p tag at the beginning.

Editing the co

4条回答
  •  情深已故
    2020-12-14 00:21

    For me it worked by making "force_br_newlines : true" instead of false.

     tinyMCE.init({
          mode : "textareas",
          theme : "advanced",
          force_br_newlines : true,
          force_p_newlines : false,
          forced_root_block : ''
      });
    

    I hope it helps

提交回复
热议问题