I can't find a way to detect the text that a user is mousing over. The onmouseover event doesn't seem to support this feature. Is there a way to do this?
https://www.w3schools.com/jsref/event_onmouseover.asp
For example, if a user mouses over "example" from this paragraph, I'd like to be able to detect that they were mousing over "example", not just that they were mousing over the paragraph element.
EDIT: I think I was too ambiguous in what I needed. Basically what I'm trying to implement is a popup dictionary for dynamic text. When the user mouses over a word it might be part of a compound word, so I'd like to have not only the word but also its place in the paragraph so I can check if it's a compound word. It sounds like I should pre-process the HTML with spans around each word/compound word.