Bookmarklet Angle-Dangle
Convert node to HTML with
angle
var selection = window.getSelection(), node = selection.anchorNode if (node instanceof Text) node = node.parentNode ;(function angle(target) { var wrapper = document.createElement("pre") wrapper.textContent = target.outerHTML target.parentNode.replaceChild(wrapper, target) })(node)
Convert back to node with
dangle
var selection = window.getSelection(), node = selection.anchorNode; if (node instanceof Text) node = node.parentNode ;(function dangle(target) { target.outerHTML = target.textContent })(node)