 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Manfred W. Guest
|
Posted: Sun Jun 29, 2003 4:05 pm Post subject: HTML, JTextPane |
|
|
Hi!
I spent an awful LOT of time playing with SWING HTML editing support in
JTextPane, and encountered loads of problems. One easy to verify is the
following (reproducable in the HTMLProcessor Application
http://www.manning.com/sbe/ swing2e.zip Examples):
I have problems, setting a correct paragraph style in the HTML Editor.
Example:
- start Chapter20/8 HTMP Processor
- enter some lines of text
- select a paragraph and apply CODE style
- everything looks ok now.
- enter a new line inside the CODE paragraph an type something.
- the new paragraph ist shown centered and not in FixedFont width
- the html code seems ok, the view is messed up!
- view source and save source, some CODE paragraphs are gone!
(How) can this be circumvented?
The only solution I found was rather ugly: get the paragraph html via the
Kit.Writer, strip html, head, body, first p and enclose it in with a CODE.
Then remove the paragraph and insert the string again with kit.read.
Is there some good documentation on the HTML Editing features, maybe stating
what is implemented, and what not? (Besides javadoc and sourcecode and sun
documentation)
Is it better to work with ParagraphStyles on an HTMLDocument or work
directly
with elements?
It seems that SWING HTML editing is either broken or only partly implemented
or I am getting something terribly wrong.
Is HTML editing feasable for a large project, or is it better to wait for a
better implementation (JDK1.5?)? Thanks
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|