title: Java getting text content from an element to include line breaks
body: <p>I have an <code>Element</code> which I got from the <code>Document</code> of a <code>WebEngine</code> (JavaFX) and I use its <code>getTextContent()</code> function from the body element to get the text content. The body element has the attribute <code>contenteditable="true"</code> so I can write on it. However the string returned from <code>getTextContent()</code> doesn't include line breaks. So</p>
  
  <pre><code>Line 1
  Line 2
  Line 3
  </code></pre>
  
  <p>On the body would return <code>Line 1Line 2Line 3</code> I need it to include line breaks. How can I get it to do this?</p>
  
  <p>Alternatively, I could use <code>&lt;TextArea&gt;</code> instead of <code>&lt;body contenteditable="true"</code> if I can find a way to style each character. But I don't know how.</p>
  
  <p>Thanks.</p>