• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTMLEditorKit

 
peejava
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hav a JEditorPane and I am using HTMLEditorKit to display text in it in 2 contenttypes
1]HTML (text/html)
2]TEXT i.e the source view of the same HTML (text/plain)
The content-type view, i.e. the WYSIWYG view for the HTML and the source view for the HTML is switched using a group of 2 radio button selection.
My problem is that, I dont want the WYSISYG view to show the "comments", i.e the data between "<!--" and "-->" tags to be shown within blocks as it does by default. I want the behaviour for the WYSIWUG view to be ditto that of a browser. A browser doesnt show "comments" for godsake when it opens .html files. Then why does this behave such way.
How do I change this behaviour of the HTMLEditorKit ? I dont want to see the comments in the text/html content type view.
If you need more info in understanding what I mean to say, please do mail me.
Thanks,
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"peejava" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it here.

Thanks! and welcome to the JavaRanch!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!