woofmark
woofmark copied to clipboard
delete key on empty textarea in wysiwyg mode does not clear formatting tags in some cases
I've found a small issue I'm able to reproduce if:
- HTML (an
h1
) already exists at load-time in the.wk-wysiwyg
element (wysiwyg mode) - All content in the
contentEditable
div
is selected and deleted - Delete key is hit once again to leave the
div
completely empty - New text is typed into the
div
-
h1
text appears, not plainp
text
Note that to clear this formatting, you can click outside the div
and click back in. This makes me think that there's some preserved formatting state in this (chromium) contentEditable
which is cleared when it loses focus.
You can try it here: https://publiclab.github.io/PublicLab.Editor/examples/
Although I'm not able to reproduce it on the default demo at https://bevacqua.github.io/woofmark/ -- and I'm wondering if there's something about the interaction of the stylesheets with the contentEditable
that causes it in one demo but not another.
Works as expected for me in Chrome.