Is there a way to get the html string of a JavaScript Range Object in W3C compliant browsers?
For example, let us say the user selects the following: Hello
Hello
Could DocumentFragment.textContent give you what you need?
var frag = document.createRange().createContextualFragment("Hello World."); console.log(frag.textContent)