Re: GetHtml() and InsertHtml()

Daniel Kirsch <[email protected]>
Newsgroups gmane.comp.mozilla.devel.editor
Organization T-Online
Message-ID <[email protected]>
Pedro Valentini wrote:
> Hi,
> I think that many others people can need this functions, can someone 
> help me to make it?
> 
>    1. getHtml() - this function return the html source from the iframe, 
> right to insert in database.
>    2. insertHtml("<h1>My Content</h1>") - this function insert in iframe 
> a html code came from database.
> 
> What do you think? It is realy util or not?


function insertHtml(html) {
   iframe.contentDocument.body.innerHTML = html;
}

function getHtml() {
   return iframe.contentDocument.body.innerHTML;
}

Daniel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.