title: Manipulate html page selection using javascript
body: <p>I'm trying to figure out how to surround the html elements I select with a div tag programmatically. Here's what the markup would look like</p>
  
  <pre><code>sdfsdf&lt;div class="highlight"&gt;sdjfksdjf&lt;strong&gt;dsfkjdf&lt;/strong&gt;dfd&lt;/div&gt;sdfdsf
  </code></pre>
  
  <p>this is the selection</p>
  
  <pre><code>sdjfksdjf&lt;strong&gt;dsfkjdf&lt;/strong&gt;dfd
  </code></pre>