title: Toggling H1 and h2 with execCommand
body: <p>I have a simple text editor and i'd like to toggle h1 tags around the current selection as i do with bold tags.
  With bold tags i do:</p>
  
  <pre><code>function onBoldClick() {
     document.execCommand( 'bold', false );
  }
  </code></pre>
  
  <p>This automatically toggles b tags around the current selection. </p>
  
  <p>With h1 tags:</p>
  
  <pre><code>function onHeading1Click() {
      document.execCommand('formatBlock', false, '&lt;h1&gt;'); 
  }
  </code></pre>
  
  <p>This only wraps h1 around the selection but there's no way to remove it.
  <br>
  Is there another way to go about this?
  Nb: it should work on i.e.  </p>