I'm interested in getting a list of the html elements in my JEditorPane that contain the selection. I think .getElementsAt a member of HTMLEditorKit.HTMLTextAction would be useful but I don't know how to implement it. I found the description at this link:
I'm new to Java. I have a JEditorPane called editArea_ and the code:
HTMLDocument doc = (HTMLDocument) editArea_.getDocument();
HTMLEditorKit ekit = (HTMLEditorKit) editArea_.getEditorKit();
int selectStart = editArea_.getSelectionStart();
How would I implement this? I've tried
HTMLEditorKit.InsertHTMLTextAction.class.getElementsAt(doc, selectStart);
Thinking since it was a static class I should be able to invoke it like this but it doesnt work. Thanks for your help