wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes custom tags using an HTMLEditorKit subclass Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "custom tags using an HTMLEditorKit subclass" Watch "custom tags using an HTMLEditorKit subclass" New topic

custom tags using an HTMLEditorKit subclass

Scott Presley

Joined: Apr 15, 2003
Posts: 25
I've created a subclass of HTMLEditorKit called CustomEditorKit(see code below) At the point in the code marked with the 'UGH' comment, I want to check to see if the unknown element is of type <expression>x+4</expression> and create return a Custom View object containing the 'x+4' inside the tags... I figured out how to check to see that the element is indeed 'expression', but it's unclear from reading online and reading through javadoc how to extract the 'x+4'.

Thanks in advance for any help,

[ July 13, 2004: Message edited by: Scott Presley ]
Stanislav Lapitsky
Ranch Hand

Joined: Dec 01, 2009
Posts: 53
I have an example of the feature.


It's implemented to support <button> tag but can be easy extended.

Consider Paul's rocket mass heater.
subject: custom tags using an HTMLEditorKit subclass
Similar Threads
Load HTML page in to JEditorPane?
pagination in jtextpane
Customizing JEditorPane
How to add gutter space after each column in JTextpane?