title: wysiwyg contendeditable createRange surroundContents
body: <p>I have a contenteditable div that I want users to be able to select a portion of, and then click a button to wrap a div with some class and styles around.</p>
  
  <p>The div I want to wrap around:</p>
  
  <pre><code>var newNode = $('&lt;div class=\'selectedFont\' style=\'text-align=center;\'&gt;');
  </code></pre>
  
  <p>The methods I need to use are in the title, I'm looking for an example.</p>
  
  <p>Thanks.</p>