title: Javascript - How to save exact whitespace count between words from textarea
body: <p>How to save exact whitespace count between words from textarea when putting it's value into html?</p>
  
  <pre><code>&lt;textarea&gt;word "10 whitespaces here" word "20 whitespaces here" word&lt;/textarea&gt;
  </code></pre>
  
  <p>html:</p>
  
  <pre><code>&lt;div style="width:50px;overflow:hidden;"&gt;word "10 whitespaces here" word "20 whitespaces here" word&lt;/div&gt;
  </code></pre>
  
  <p>So that all text inside div would be visible.</p>