Re: How can I set my own text into a browser?
Ok, so I did something like this:
document.getElementById('messagepane').contentDocument. That extracts my content and I can add tags, since it is HTML. But my problem is after I put my tags, how do I put the new content in the browser?
I know for editor, you have smth like rebuildDocumentFromSource(your_text).
I don't know for browser how this is done.
Regards,
Ioana
Neil <neil@parkwaycc.co.uk> wrote: Ioana Giurgiu wrote:
[color=blue]
>Thanks for the extensive answers i got for my last post. Indeed, the browser i was referring to is 'messagepane'. But how can I set my own text into the browser (after I read the mail, I want to take the content and add some font colors to certain parts... and then set the modified text back into the browser).
>
>[/color]
You can access its .contentDocument property and then do normal DOM
manipulation from there on.
--
Warning: May contain traces of nuts.
_______________________________________________
dev-extensions mailing list
[email]dev-extensions@lists.mozilla.org[/email]
[url]https://lists.mozilla.org/listinfo/dev-extensions[/url]
---------------------------------
Got a little couch potato?
Check out fun summer activities for kids.
Re: How can I set my own text into a browser?
Ioana Giurgiu wrote:
[color=blue]
>Ok, so I did something like this:
>document.getElementById('messagepane').contentDocument. That extracts my content and I can add tags, since it is HTML. But my problem is after I put my tags, how do I put the new content in the browser?
>[/color]
Well, the lazy way is to read and write .contentDocument.body.innerHTML
otherwise you have to read up on how to use the DOM manipulation
functions such as .splitText
--
Warning: May contain traces of nuts.