Word Selection Javascript Tool?

I'm building an educational tool, and I have a input box and I would like the user to select parts of the given input.

Example:

Please select the nouns.

Monkeys jump up and down like Jeffry Phillips.

In this case the user would select Monkey and Jeffry Phillips. Is there a good tool available to select words from an input box?