title: How To Wrap / Surround Highlighted Text With An Element
body: <p>I want to wrap a selected text in a div container with span, is it possible?</p>
  
  <p>A user will select a text and will click a button, on button click event I want to wrap that selected text with span element. I can get the selected text using <code>window.getSelection()</code> but how to know its exact position in DOM structure?</p>