title: how to get properly formatted text value from a div
body: <p>I am trying to get the formatted text from a contenteditable='true' div to send to my server.</p>
  
  <p>I used to use a textarea and when you get the value of a textarea it preserves white space and line breaks, but when using a contenteditable div even when using styles such as the following I can not get the properly formatted text:</p>
  
  <pre><code>white-space: pre-wrap;
  word-wrap: break-word;
  </code></pre>
  
  <p>For example if I type this into my div:</p>
  
  <pre><code>"a
   aa
  
  asdf"
  </code></pre>
  
  <p>I will get this out with textContent: </p>
  
  <pre><code>"a aaasdf"
  </code></pre>
  
  <p>Is there any way to get formatted text out of a contenteditable div like a textarea?</p>