Hi,
I have already create a WYSIWYG editor which opens the HTML file to be edited.. the problem comes when I try to write the file correctly...
I use:
$fp = @fopen("temp.htm","w");
$content = stripslashes($content);
fwrite($fp, $content);
fclose($fp);
this adds the page which has been updated.. the problem is that I cannot get the editor to save ALL the html. It seems to cut out the <HEAD></HEAD> part.. I need this as I have Javascript in the page.... but when the page is saved, it gets rid of it.
I use the following function to save the HTML in the editor:
function savedocument()
{
htmtext=iView.document.body.innerHTML;
iView.document.body.innerText=htmtext;
document.saveform.content.value=iView.documentElement.outerHTML;
}
that is supposed to return all the HTML in the iFrame (the editor) window.. but only returns the MAIN html..ie: not the <head> tags...
PLEEEAAASSSSE help!
Thanks!!
Matt Facer,
Manchester (UK)