If enter is hit in empty node, the node gets deleted and
clone of it's parent is created and inserted after the original.
var anchor = $(window.getSelection().anchorNode);\r
if(anchor[0].nodeType === Node.TEXT_NODE)\r
anchor = anchor.parent();\r
var anchor = $(window.getSelection().anchorNode);\r
if(anchor[0].nodeType === Node.TEXT_NODE)\r
anchor = anchor.parent();\r
+ if(anchor.text() === '') {\r
+ var todel = anchor;\r
+ anchor = anchor.parent();\r
+ todel.remove();\r
+ }\r
var newNode = anchor.clone().empty();\r
newNode.attr('id', '');\r
anchor.after(newNode);\r
var newNode = anchor.clone().empty();\r
newNode.attr('id', '');\r
anchor.after(newNode);\r