title: Clean Html from contenteditable
body: <p>I'm trying to save contenteditable data to a javascript-array. Every new line should be an array-item</p>
  
  <p>First of I cleaned out Chromes html:</p>
  
  <pre><code>html = html
  //empty line looks like this:
  .replace(/&lt;div&gt;&lt;br\s*[\/]?&gt;&lt;\/div&gt;/gi,'')
  //Chrome wraps each line in a div
  .replace(/&lt;div&gt;/gi,'\n')
  .replace(/&lt;\/div&gt;/gi,'')
  //Sometimes chrome adds a break.
  .replace(/&lt;br\s*[\/]?&gt;/gi,'');
  </code></pre>
  
  <p>Later on I do:</p>
  
  <pre><code>html.split("\n");
  </code></pre>
  
  <p>I just tested in firefox, And realized that they make newlines by adding breaks. I haven't even looked at internet explorer yet.</p>
  
  <p>Is there a more general-approach or well-tested way to extract just the text as lines of text separated by newline-carachter from html?</p>