How to delete an HTML element inside a div with attribute contentEditable?
This turned out to be more complicated than I thought. Or I’ve made it more complicated than it needs to be. Anyway, this should work in all the big browsers: function getLastTextNodeIn(node) { while (node) { if (node.nodeType == 3) { return node; } else { node = node.lastChild; } } } function isRangeAfterNode(range, node) … Read more