title: Keep new lines from array in div vs textarea
body: <p>Currently I have a bunch of text stored in an array.  When I output that in the console I see the new lines being kept.  If I output that into a textarea it works great and I have new lines, but I can't format the text with different colors (I need selections color coded based on keywords)</p>
  
  <p>What I want to do is have the look of the text area with the new lines but output it to something like a <code>&lt;div&gt;&lt;p&gt;array output here&lt;/p&gt;&lt;/div&gt;</code> but keep the new lines.  Whatever I try it breaks them and  I see all the text together.</p>
  
  <p>Here is the code that I'm using:</p>
  
  <pre><code>//Works great but not format friendly as in colors
  $('#textarea').val(myArray)
  
  //format friendly colors but does not keep new lines
  $('div[title^="divContainer"]').find('p').text(myArray);
  </code></pre>
  
  <p>any suggestions to have the best of both worlds?</p>
  
  <p>Thanks</p>