The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Detect selected text Re: Detect selected text

Capt Otis

Here is what you are looking for…


Untitled Document

Highlight any part of this text then click the button to make it selected.

Now the only problem is you can’t overlap your highlight with my script, because the getSelectedText only returns text, not also html. I’m working on a fix for that. Enjoy