Detect what is selected (highlighted) or clicked within an element on a page?
- by Fog Cook
How would one go about detecting what has been selected on a page in a browser? Example: Click, hold, select 3 words and 1 image on a page, release.
Sub-question: How to detect what letter someone clicked on?
Without using: A span injector breaking everything up OR a WYSIWYG plugin
I'm hoping this isn't just a type of browser interaction you can't detect.
There could be many uses, but my goal is a simple 'live' page editor, or at least a way to know what someone is clicking on/selecting aside from just the id of an element.