This question already has an answer here:
- javascript user selection highlighting 6 answers
I'm not finding anything anywhere. Is there a JQuery solution to retrieve highlighted text? I need to check the highlighted text for spans, get those spans' style attributes, and manipulate them based on that. I can do that part with regular expressions or whatever obviously, but first I need access to the highlighted text! I'm struggling to even find a cross-browser plain javascript solution, so if you've got one of those handy that would help immensely as well.
Thanks!