[Project_owners] setting HTML text

Eric Jung grimholtz at yahoo.com
Thu Mar 24 04:42:18 EST 2005

Although I don't know the answers to your questions, you might find
them at the MozillaZine Extension Forum
(http://forums.mozillazine.org/viewforum.php?f=19) or at the
MozillaZine Knowledge Base (http://kb.mozillazine.org). The forums in
particular are very active.


--- Roman Mironenko <roman_mir at hotmail.com> wrote:
> Hi everyone,
> I hope you guys are not getting tired from my questions yet :)
> I found a way to get the text that is currently selected in the
> browser:
> var focusedWindow = document.commandDispatcher.focusedWindow;
> var selection =
> focusedWindow.__proto__.getSelection.call(focusedWindow);
> it is quite strange, I did not find any references to what
> __proto__ means.
> But now I would like to be able to modify the selected text - I
> need to 
> preserve the structure of the HTML so that the elements will stay
> where they 
> are and only the text would change and I cannot find how to do that
> anywhere.  I started working on my extension about a week ago and I
> still 
> don't understand most of how things fall together under this
> framework, and 
> it seems that xulplanet reference is incomplete.
> Well, if anyone knows how to do this and can explain it to me I
> will be 
> grateful,
> otherwise I guess it will have to do it in the trial/error kind of
> way.
> Thank you,
> Roman
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners

Do you Yahoo!? 
Make Yahoo! your home page 

More information about the Project_owners mailing list