title: Is there a way to keep execCommand("insertHTML") from removing attributes in chrome?
body: <p>Context is Chrome 37.0.2062.120 m.  </p>
  
  <p>I'm using execCommand to insert html into an editable div.  My execCommand call looks like this:</p>
  
  <pre><code>function insertHTML(){
      document.execCommand('insertHTML', false, '&lt;span id="myId"&gt;hi&lt;/span&gt;');
  }
  </code></pre>
  
  <p>When the editable div looks like this:</p>
  
  <pre><code>&lt;div contenteditable="true"&gt;
      some [insertion point] content
  &lt;/div&gt; 
  </code></pre>
  
  <p>and I use execCommand to insert html into a contenteditable div, all of the attributes of the HTML are inserted as expected and I end up with this:</p>
  
  <pre><code>&lt;div contenteditable="true"&gt;
      some &lt;span id="myId"&gt;hi&lt;/span&gt; content
  &lt;/div&gt; 
  </code></pre>
  
  <p>When, however, I insert the exact same html into this structure:</p>
  
  <pre><code>&lt;div contenteditable="true"&gt;
      some content
      &lt;div&gt;more [insertion point] content&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The attributes are removed from the span being inserted and it ends up looking like this:</p>
  
  <pre><code>&lt;div contenteditable="true"&gt;
      some content
      &lt;div&gt;more &lt;span style="font-size: 10pt;"&gt;hi&lt;/span&gt; content&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Is there any way to keep this from happening?</p>