bevacqua / woofmark

:dog2: Barking up the DOM tree. A modular, progressive, and beautiful Markdown and HTML editor
https://bevacqua.github.io/woofmark
MIT License
1.63k stars 65 forks source link

HTML mode content get wrapped in <p> tags upon every refresh #9

Open danvim opened 9 years ago

danvim commented 9 years ago

I think I've found another bug using the editor. The resulted text is not consistent refreshing the page with text in HTML mode.

I'm using Firefox Nightly 41,

Problem: Texts unexpected appended to editor upon refresh

Expected Result: <h1>Heading Text</h1> be consistent.

Actual Result: First time refresh: <p><h1>Heading Text</h1></p> Second time refresh: <p><p><h1>Heading Text</h1></p></p>

Procedures: Input any text into HTML mode, refresh page.

Analysis: The content is not consistent. <p> tags is being prepended and appended upon every refresh in HTML mode.

bevacqua commented 9 years ago

I can't reproduce this issue. Please provide precise repro steps

danvim commented 9 years ago

Still using Nightly, but Firefox should reproduce the issue.

Steps:

  1. Use http://bevacqua.github.io/woofmark/
  2. Use "HTML" mode and delete everything
  3. Paste in <h1>Heading Text</h1>
  4. Click the refresh button on the right of the address bar.
  5. The editor should now contain <p><h1>Heading Text</h1></p>
bevacqua commented 9 years ago

Can you work out a fix for this issue?