title: javascript: select sentence in a paragraph
body: <p>I want to create a text annotation tool. Suppose we have some texts displayed like in the picture below, the objective effect is: after the user click on somewhere in the text, the whole sentence is automatically selected and highlighted.</p>
  
  <p><img src="https://i.stack.imgur.com/Qdezd.png" alt="enter image description here"></p>
  
  <p>I have no idea how to achieve that effects. Can someone points me either codes or resources that can solve this problem?</p>
  
  <p>Thanks!</p>