title: What is the most convenient way to convert HTML to plain text while preserving line breaks (with JavaScript)?
body: <p>Basically I just need the effect of copying that HTML from browser window and pasting it in a textarea element.</p>
  
  <p>For example I want this:</p>
  
  <pre><code>&lt;p&gt;Some&lt;/p&gt;
  &lt;div&gt;text&lt;br /&gt;Some&lt;/div&gt;
  &lt;div&gt;text&lt;/div&gt;
  </code></pre>
  
  <p>to become this:</p>
  
  <pre><code>Some
  text
  Some
  text
  </code></pre>