title: Select Text & highlight selection or get selection value (React)
body: <p>I have a React application which displays some spans:</p>
  
  <pre><code>&lt;span&gt;Hello&lt;/span&gt; &lt;span&gt;my&lt;/span&gt; &lt;span&gt;name&lt;/span&gt; &lt;span&gt; is &lt;/span&gt; ...
  </code></pre>
  
  <p>I would like the user to select the text with the mouse like so <a href="https://i.stack.imgur.com/w4iuO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/w4iuO.png" alt="Hello my Name is"></a></p>
  
  <p>..and then get the selected value, or highlight the text etc.
  How would I do this in React? I am not sure what event handlers to use and how to get hold of the current selection! A minimal example or a hint would be appreciated!</p>