> Ah this is nice! I'm new at programming for the mozilla environment. > But using the iteratior doesn't really seem that much efficient for > this simple traversal of the entire tree? (I imagine the iterator > itself will recurse behind the scenes?)
It should be: according to [EMAIL PROTECTED] looping through nextSibling is JS is quite slow. > My main problem is in dealing with selections/ranges in a proper way > in the composer. Right now I only to a simple toString() of the entire > selection and replace the text with InsertText(), which of course > destroys anything more advanced than plain text. Well offhand all I can think of is getting the selection as HTML, extract the tags and rot13 the text, then insert html source. You have to be careful to use Editor's transactions and undoable methods...
