Hi!
I would like to set the id of the body in the editor but can't seem to find a way to do it. The reason is so that my css:s will be interpreted correctly.
I'm using fckeditor to edit the contents of a webpage so I would like the body in the editor iframe to have the same id as the content table on the finished webpage. That way the css properties for the contents will be applied in the editor also.
Does anyone have any ideas?
/Gustav
I would like to set the id of the body in the editor but can't seem to find a way to do it. The reason is so that my css:s will be interpreted correctly.
I'm using fckeditor to edit the contents of a webpage so I would like the body in the editor iframe to have the same id as the content table on the finished webpage. That way the css properties for the contents will be applied in the editor also.
Does anyone have any ideas?
/Gustav
RE: Setting iframe body id
function setBodyId( editorInstance )
{
editorInstance.EditorDocument.body.id="myId";
}
function FCKeditor_OnComplete( editorInstance )
{
//first
setBodyId(editorInstance);
//on reload
editorInstance.Events.AttachEvent( 'OnAfterSetHTML', setBodyId ) ;
}
RE: Setting iframe body id
Alfonso, I can't thank you enough.
/g