Thread View: borland.public.jbuilder.java.api
2 messages
2 total messages
Started by mathieu
Fri, 01 Aug 2003 21:26
Cant read the full text of a HTMLDocument???
Author: mathieu
Date: Fri, 01 Aug 2003 21:26
Date: Fri, 01 Aug 2003 21:26
10 lines
1437 bytes
1437 bytes
I would like to display all the text of a HTMLDocument inside a JEditorPane. At the moment I can get the text which is inside the tags but I would like to have all the text...INCLUDING THE TAGS THEMSELVES...
I have tried the following but it does not work:
JEditorPan pane = new JEditorPane();
pane.setEditorKitForContentType("text/plain", new HTMLEditorKit());
pane.setPage("http://www.mypage.com");
Please help me... :)
Re: Cant read the full text of a HTMLDocument???
Author: John McGrath [TeamB]
Date: Wed, 06 Aug 2003 02:51
Date: Wed, 06 Aug 2003 02:51
17 lines
1474 bytes
1474 bytes
On 8/1/2003 at 5:26:28 PM, mathieu wrote:
> JEditorPan pane = new JEditorPane();
> pane.setEditorKitForContentType("text/plain", new HTMLEditorKit());
> pane.setPage("http://www.mypage.com");
It looks like you are telling the JEditorPane that it should use an
HTMLEditorKit when it encounters a plain text document. I think you
want to tell it that it should use a non-html editor kit when it
encounters an HTML document. Try this instead:
pane.setEditorKitForContentType("text/html", new StyledEditorKit());
--
Regards,
John McGrath [TeamB]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads