title: Perform action when word from text is highlighted/selected
body: <p>I need to show a tooltip for a selected/highlighted text in order to allow users to make it italic/bold/normal. I will probably wrap that word in a span with related class for styling, however I need to figure out how to show such tooltip and process selected word so I can perform actions on it. I was trying to find a library that does this, but so far no luck.</p>
  
  <p>Image below demonstrates what I'm after:</p>
  
  <p><a href="https://i.stack.imgur.com/bkeHv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bkeHv.png" alt="enter image description here"></a></p>
  
  <p>Where users select word Works and tooltip appears.</p>