Gautam Bhagra wrote:
Hi,
I wanted to get the text, selected by the user, in Firefox browser window(including the HTML tags). Can anyone please guide me to any Mozilla component or API that will help me get the same? Thanks,
Gautam

The window object has a getSelection method which returns an nsISelection. From there you can iterate over the ranges in the selection although normally there will only be one range, or you can get the endpoints of the selection using the anchorNode and focusNode properties.

/ Neil
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to