Hello,
I've figured out how to make my custom tag reconginze itself from the
HTML and do a custom view for it. Now I'd like to make it such that in
an editable JEditorPane, the user cannot delete this particular tag. I
have no idea how to do this.
One way would be to detect the removal and undo the remove (but that
is REALLY hookey).
Does anyone have any ideas on this one?
Thanx SD.
SD - 04 Feb 2004 21:14 GMT
I figured it out: override the method:
javax.swing.text.html.HTMLDocument.remove(int offs, int len)
and use getCharacterElement(offs) to get the tag being removed and don't
call the super classes remove if you don't want the tag removed.
SD.