Browser Automatically Inserts Unwanted Code On Enter In Contenteditable Div
I've got a contenteditable div with an ul and some li's in it. Now if I want to add some more text behind the list, I place the cursor after the last li ('3') and hit enter twice.
Solution 1:
This is one of bigger sets of Blink's and Webkit's (Chrome, Opera, Safari) bugs. On CKEditor's dev site there's a ticket grouping some of them and I reported it also on Blink's and Webkit's sites:
- http://code.google.com/p/chromium/issues/detail?id=226941
- https://bugs.webkit.org/show_bug.cgi?id=114791
but no one responded... ;/
As was said, there are only two ways to get rid of this problem:
- write your own backspace, delete and enter keys support (very complicated),
- don't use any styling (very uncool).
So I'm afraid that there's no other option currently than reminding Blink and Webkit teams that their engines should not produce this crappy HTML.
Post a Comment for "Browser Automatically Inserts Unwanted Code On Enter In Contenteditable Div"