In content Editable DIV, on pressing the Enter Key,div tag is appended in chrome... Can it be possible to change it to br tag?
I have tried the below code. But It is working only if i press "Enter" key twice,if i type some contents before it. For Empty lines, it s working fine.
var range = window.getSelection().getRangeAt(0);
var Node = document.createElement("BR");
range.insertNode(Node);
range.setStartAfter(Node);
sel.removeAllRanges();
sel.addRange(range);
event.preventDefault();
can anyone help me on this issue? Thanks in advance...