My implementation uses the recommended JavaScript setup.
I have a situation where the editor content is loaded using ajax and a form built around the editor. In edit mode, the form displays the editor. In read mode, it displays the contents of the editor, but hides the editor itself. The user can toggle between the modes.
At this point, I have scripts that track if all known instances of fckeditor have successfully loaded, before allowing my scripts to progress and setup the forms. This works fine.
However, when my script hides the container holding the editor and attempts to read its contents, it appears the editor gets instantiated again (as the FCKeditor_OnComplete function gets called again and the fckstyles.xml gets downloaded again) and attempting to call SetXHTML/SetHTML/SetData during this period throws an error.
I really don't understand why hiding a parent should cause the editor to re-initialize itself and I was wondering if there was a way to get around this issue? There is really no way that I can cause my scripts to wait just because an object that already exists needs to start again.
Any help is appreciated, thanks.
I have a situation where the editor content is loaded using ajax and a form built around the editor. In edit mode, the form displays the editor. In read mode, it displays the contents of the editor, but hides the editor itself. The user can toggle between the modes.
At this point, I have scripts that track if all known instances of fckeditor have successfully loaded, before allowing my scripts to progress and setup the forms. This works fine.
However, when my script hides the container holding the editor and attempts to read its contents, it appears the editor gets instantiated again (as the FCKeditor_OnComplete function gets called again and the fckstyles.xml gets downloaded again) and attempting to call SetXHTML/SetHTML/SetData during this period throws an error.
FCKBrowserInfo is not defined FCKKeystrokeHandler()()fckedito..._gecko.js (line 48) ProcessHiddenField()()
I really don't understand why hiding a parent should cause the editor to re-initialize itself and I was wondering if there was a way to get around this issue? There is really no way that I can cause my scripts to wait just because an object that already exists needs to start again.
Any help is appreciated, thanks.