nhn / tui.editor

🍞📝 Markdown WYSIWYG Editor. GFM Standard + Chart & UML Extensible.
http://ui.toast.com/tui-editor
MIT License
16.91k stars 1.72k forks source link

The HTML in the Preview tab is different from the HTML that is returned in the getHTML() method. #3194

Open Nareznoy opened 9 months ago

Nareznoy commented 9 months ago

Describe the bug

The HTML in the Preview tab is different from the HTML that is returned in the getHTML() method. Two adjacent lines in Preview are in the same \<p> tag, and the getHTML() method returns each line in a separate \<p> tag.

To Reproduce

Steps to reproduce the behavior:

  1. Type 'first line' in the MD editor
  2. press Enter to break the line
  3. Type 'second line' int the MD editor

Expected behavior

The getHTML() method should return the same HTML as in the preview tab. That is, two adjacent lines must be in the same \<p> tag, and not in different ones

Screenshots

getHTML() returns two different \<p> tags: image There is only one \<p> tag in the preview tab: image

Desktop (please complete the following information):