🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #1810

One HTMLDocument...2 views...???

#1810
From: Mathieu Renaud
Date: Thu, 31 Jul 2003 17:49
23 lines
1870 bytes
I would like to code a html editor with 2 views on the same document:
- one view is the rendered HTML
- the other is the actual HTML code (like a text-based html editor)

I have 2 JEditorPane and by setting both ones on the same HTMLDocument, I
can see the modifications in real time inside both of them. The panel which
renders the HTML works great but unfortunatly I cant see the tags inside my
code-view panel. The only thing that appears is the text found between the
tags of the document...How can I display every piece of the document
including the tags?

Here is what it looks like:
...
panelCodeView.setEditorKit (new HTMLEditorKit ());
panelCode.setContentType ("text/plain");
...
panelCode.setDocument(htmlDoc);
...
panelDesignView.setPage(new URL("http://www.google.com"));
HTMLDocument doc = panelDesign.getDocument();
panelCodeView.setDocument(doc);

Thanks!
Technical Details
Message-ID: <3f2956a2$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,5cbefb66cb23cad,start
X-Google-Attributes: gid111d45,public
X-Google-ArrivalTime: 2003-07-31 10:56:13 PST
Reply-To: "Mathieu Renaud" <mathieu_renaud@videotron.ca>
From: "Mathieu Renaud" <mathieu_renaud@videotron.ca>
Newsgroups: borland.public.jbuilder.java.swing
Subject: One HTMLDocument...2 views...???
Date: Thu, 31 Jul 2003 13:49:22 -0400
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 65.95.47.166
Message-ID: <3f2956a2$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059673762 65.95.47.166 (31 Jul 2003 10:49:22 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail