title: Making a JEditorPane with html put correctly formatted text in clipboard
body: <p>I have this code to demonstrate the problem:</p>
  
  <pre><code>public static void main(String[] args) {
      JFrame frame = new JFrame();
      frame.getContentPane().add(new JEditorPane("text/html", "Hello cruel world&lt;br&gt;\n&lt;font color=red&gt;Goodbye cruel world&lt;/font&gt;&lt;br&gt;\n&lt;br&gt;\nHello again&lt;br&gt;\n"));
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.pack();
      frame.setLocationRelativeTo(null);
      frame.setVisible(true);
  }
  </code></pre>
  
  <p>If you select all the text that appears in the frame once the app starts, you can copy it and paste it into MS Word, Apple's Pages, or Mail and the text is formatted correctly. But if you paste it into a pure text editor such as TextEdit, Smultron, or a Skype chat window all the pasted content is on one line.</p>
  
  <p>What can I do to make the text copied to the clipboard able to be pasted with newlines preserved?</p>
  
  <p>I'm running my code on Mac OS X 10.7</p>