Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    You need to look at contentEditable, making an editable area for your input, will allow you to highlight the text in the way you describe. Alternatively you could use tinyMCE, but between the two contentEditable and editable divs will be the easier to learn how to use. Commented Aug 26, 2012 at 10:44
  • I Googled it in all possible queries, even looked how Stackoverflow did its tag selection when posting a question, but honestly, I can't figure out how to only highlight the term that has been retrieved (they alls start by "@"). It's actually similar to FB functionality when you type "@[username]", the value is highlighted once selected. Commented Aug 26, 2012 at 10:49