• Post Reply Bookmark Topic Watch Topic
  • New Topic

Troubble with HTML-Tags in a HTMLEditorKit

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
I've got some problems using JEditorPane as an HTML-Editor-Applet.
I'm using the HTMLEditorKit and I can handle some Actions like bold, italic, underlined, forgroundcolor and I can set links.
I've got a second JEditorPane to display the HTML-Source.
To switch between both Panes the value of the one pane is copied into the other.
I'm using htmlPane.setText(wysiwygPane.gettext()); for this.
When I switch back into the Wysiwyg-Mode everything's displayed right but it is impossible to redo the actions.
For example:
A String is set in my WYSISWG Pane:
wysiwygetPane.setText("someText someBoldText someOtherText")
When I highlight this text and use a BoldAction the complete text is bold and the String is "someText someBoldText someOtherText" how it should be,
but when I do this a second time the text is displayed none-bold but the String is "someText someBoldText someOtherText" and not "someText someBoldText someOtherText"
I hope you could understand enough of my bad english to help me
J�rn
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
argh.... HTML-Tags are displayed.... the bold text should be <b> boldtext </b>
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!