I have a contenteditable
element, and whenever I type some stuff and hit ENTER
it creates a new <div>
and places the new line text in there. I don't like this one little bit.
Is it possible to prevent this from happening or at least just replace it with a <br>
?
Here is demo http://jsfiddle.net/jDvau/
Note: This is not an issue in firefox.
, chrome - not, but after fixing your styles, extra divs do not break left padding. Question is why you dont like it? Think it is br... http://jsfiddle.net/jDvau/1/ Also you can use DOMSubtreeModified event on catch these divs and remove them. – ViliusL Dec 05 '13 at 10:46