E
Edd Read
Hi,
I have made a basic WYSIWYG editor using the execCommand functions. I
use an iFrame as the editing area and so far I have managed to create
documents from a blank page and save them to a database.
What I am having problems doing is editing an existing HTML document.
Until now I have used a button with onclick element as follows to
populate the iFrame with the current HTML:
onclick="iEditor.document.body.innerHTML = '<font color=#000066>This is
a test page';"
[where iEditor is the iFrame]
The hassle of having to click a button to populate the editor is
annoying, so I have tried to run this command at the <body onload="...
stage however I get an error saying the object iView.document.body is
non-existant.
Can anyone offer any advice (or links to any advice) regarding this
'problem'?
Thanks for your help!
Regards
Edd
I have made a basic WYSIWYG editor using the execCommand functions. I
use an iFrame as the editing area and so far I have managed to create
documents from a blank page and save them to a database.
What I am having problems doing is editing an existing HTML document.
Until now I have used a button with onclick element as follows to
populate the iFrame with the current HTML:
onclick="iEditor.document.body.innerHTML = '<font color=#000066>This is
a test page';"
[where iEditor is the iFrame]
The hassle of having to click a button to populate the editor is
annoying, so I have tried to run this command at the <body onload="...
stage however I get an error saying the object iView.document.body is
non-existant.
Can anyone offer any advice (or links to any advice) regarding this
'problem'?
Thanks for your help!
Regards
Edd