Simon Fraser wrote:
> 
> In article <[EMAIL PROTECTED]>, Ulf Knoblich <[EMAIL PROTECTED]>
> wrote:
> 
> > I am working in an information extraction project and we need to
> > retrieve the source code of a selection made by a
> >
> > user in his browser.
> > Someone wrote a DLL for MSIE I think, but I don't know if a similar
> > thing works for Netscape. I also tried the
> >
> > HotJava Component, which could be inserted as an applet, but it only
> > supports HTML 3.2 and has some bugs. So I
> >
> > thought maybe we could use te Mozilla editor. Or is there a simpler way
> > to do this?
> > So, the user selects some text in a browser window, we want to get the
> > start/end positions of this selection in the
> >
> > source code. And the solution should be as platform independent as
> > possible. :)
> 
> Try
> 
> window.editorShell.getContentsAs("text/html", 1);
> 
> See nsIEditorShell for the GetContentsAs method, and nsIDocumentEncoder
> for the flags.

Thanks for your quick answer, but I don't know where/how to try this. I
tried it in JavaScript, then editorShell is 'undefined', I got the same
trying to use JSObject in Java with Netscape 4.76. Or did you mean I
should try this with Mozilla?

Ulf

Reply via email to