Да, вы можете сохранить содержимое JTextPane с помощью HTMLEditorKit или RTFEditorKit.
StyledDocument doc = (StyledDocument)textPane.getDocument();
HTMLEditorKit kit = new HTMLEditorKit();
BufferedOutputStream out;
try {
out = new BufferedOutputStream(new FileOutputStream(new File("rich.html")));
kit.write(out, doc, doc.getStartPosition().getOffset(), doc.getLength());
} catch (FileNotFoundException | IOException e) {
} catch (BadLocationException e) {
}