Skip to content Skip to sidebar Skip to footer

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:

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"