F
fiziwig
I have written out the contents of a JTextPane StyledDocument as HTML
using this code:
....
try {
writer = new CharArrayWriter();
MinimalHTMLWriter htmlWriter = new
MinimalHTMLWriter(writer, (StyledDocument)textRegion.getDocument());
htmlWriter.write();
}
catch (IOException ex) {
.....
Now I need to restore the contents into a new JTextPane from that saved
HTML. Since there's a way to write HTML from a StyledDocument I'm
assuming there's a way to read HTML into a StyledDocument. I just can't
seem to find it anywhere.
Can anyone point me in the right direction?
Thanks,
---gary
using this code:
....
try {
writer = new CharArrayWriter();
MinimalHTMLWriter htmlWriter = new
MinimalHTMLWriter(writer, (StyledDocument)textRegion.getDocument());
htmlWriter.write();
}
catch (IOException ex) {
.....
Now I need to restore the contents into a new JTextPane from that saved
HTML. Since there's a way to write HTML from a StyledDocument I'm
assuming there's a way to read HTML into a StyledDocument. I just can't
seem to find it anywhere.
Can anyone point me in the right direction?
Thanks,
---gary