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.62k stars 74 forks source link

Less-than-carets are removed when event is triggered #47

Open oyvinev opened 7 years ago

oyvinev commented 7 years ago

The less-than caret followed by text is removed when you e.g. set some text to bold in wysiwyg mode.

E.g: in the demo, write "<e", and change some other text to bold.

Is there any possibility to preserve these when typed in?

LoveAndCoding commented 7 years ago

This issue comes from HTML special characters not being escaped properly in the WYSIWYG editor. Getting the textContent or innerText from the browser will give the unescaped version of the text. I've fixed the issue over at BlinkUX/woofmark and I'll try and see if I can't clean up a PR to merge upstream.