R
Robin
Hi,
I'm using a JEditorPane to display HTML.
I need to know if it's possible to exactly determine in the HTML source
the current caret position is.
i.e if the JEditorPane is displaying:
hello world
and the caret is at position 3 (between the 2 'l's in hello), how can I
find the corresponding position in the HTML source - in this case the
HTML source would be "<html><head></head><body>hello
world</body></html>", and the value I need is 28.
Many thanks,
Rob
I'm using a JEditorPane to display HTML.
I need to know if it's possible to exactly determine in the HTML source
the current caret position is.
i.e if the JEditorPane is displaying:
hello world
and the caret is at position 3 (between the 2 'l's in hello), how can I
find the corresponding position in the HTML source - in this case the
HTML source would be "<html><head></head><body>hello
world</body></html>", and the value I need is 28.
Many thanks,
Rob