Expand my Community achievements bar.

get selected text


Former Community Member
given a text field or text input field with following content:

"the fox is brown"

the user selects "fox"

How can I find out in Javascript what the user has selected. I would even accept that the user has to clici a button after selection of a text part to provide an event.


1 Reply


Former Community Member
I can only give you the complete text ....I cannot give you what the user has selected because any subsequent action (clicking of the button) will de-select the text.