R
Roshan Mathews
I have an IFrame in my page which I have made editable by setting
designMode="on".
When I add content to the document in the IFrame using:
t = iframedoc.createTextNode("text");
r = iframewin.getSelection().getRangeAt(0);
r.insertNode( t );
the "text" gets displayed in the iFrame, but I can't backspace or
delete it. In Firebug, I can see that the default <BR> tag has the
attributes "_moz_editor_bogus_node=TRUE" and "_moz_dirty".
Now if I add a space, (or anything else from the keyboard), the BR
tag's _moz_editor_bogus_node attribute is removed, and I can backspace
or delete the "text" added. But removing that attribute by using
node.removeAttribute() doesn't seem to enable the backspacing of the
text.
Any ideas/pointers on how I may fix this?
Thanks,
Roshan Mathews
designMode="on".
When I add content to the document in the IFrame using:
t = iframedoc.createTextNode("text");
r = iframewin.getSelection().getRangeAt(0);
r.insertNode( t );
the "text" gets displayed in the iFrame, but I can't backspace or
delete it. In Firebug, I can see that the default <BR> tag has the
attributes "_moz_editor_bogus_node=TRUE" and "_moz_dirty".
Now if I add a space, (or anything else from the keyboard), the BR
tag's _moz_editor_bogus_node attribute is removed, and I can backspace
or delete the "text" added. But removing that attribute by using
node.removeAttribute() doesn't seem to enable the backspacing of the
text.
Any ideas/pointers on how I may fix this?
Thanks,
Roshan Mathews