I would like to get the full text content inside an element, even if only a part of the text is selected.
Would be possible to modify this code some how to take this into account?
Would be possible to modify this code some how to take this into account?
Code:
if (window.getSelection){
selection=window.getSelection();
}
else if (document.getSelection){
selection=document.getSelection();
}
else if (document.selection){
selection=document.selection.createRange();
}
alert(selection);
Comment