I have a React application which displays some spans:
Hello my name is &l
I think that it's the right way...
document.onmouseup = () => { console.log(window.getSelection().toString()); };