title: Convert innerHTML of a contenteditable text to normal string
body: <p>I use a content-editable element :</p>
  <pre><code>&lt;span id=&quot;myinput&quot; contenteditable=&quot;true&quot;&gt;This is editable.&lt;/span&gt;
  </code></pre>
  <p>and</p>
  <pre><code>document.getElementById('myinput').innerHTML
  </code></pre>
  <p>to read its content from Javascript.</p>
  <p>But the result is :</p>
  <ul>
  <li><p><code>&quot;blah    &quot;</code> =&gt;   <code>innerHTML = &quot;blah &amp;nbsp &quot;</code></p>
  </li>
  <li><p><code>&quot;bonjour\n bonsoir&quot;</code>  =&gt;  <code>innerHTML = &quot;bonjour&lt;br&gt;bonsoir&quot;</code> (Firefox) and <code>innerHTML = &quot;bonjour&lt;div&gt;bonsoir&lt;/div&gt;&quot;</code> (Chrome)</p>
  </li>
  <li><p>maybe there are lots of other things that are translated into HTML...</p>
  </li>
  </ul>
  <p><strong>How to convert <code>innerHTML</code> into normal text?</strong></p>
  <p>(i.e. in my 2 examples : <code>&quot;blah    &quot;</code> and <code>&quot;bonjour\n bonsoir&quot;</code>)</p>