Retrieve selected text in GeckoWebBrowser

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Retrieve selected text in GeckoWebBrowser

cnhx27
Hi,


I'm using GeckoFX with C#.NET. Some text in the page can be selected. This text is composed of one or more DOM elements. I want to retrieve the selected text in the page.

geckoWebBrowser.Window.Selection is an accessor for a GeckoSelection object which contains some informations such as

    AnchorOffset: offset within the (text) node where the selection begins,

    FocusOffset: offset within the (text) node where the selection ends.

I can't find how to get all the nodes & offset where selection starts and ends, or how can I can get a range of all elements spanned by the selection.

How can I do this?



Thanks

Christian.
_______________________________________________
dev-embedding mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-embedding