Hi there! I'm simply loosing my brain trying to fix a nasty bug with FCK. Basically I have two FCKeditor created with javascript invocation code (but even if I try to invoke them with PHP the situation is the same). These editors are instanced with different names, for example description and article. Since are on my admin-side I prefer to use Ajax so i try to catch the data using FCKeditorAPI as mentioned in tons of post || pages of documentations of FCK. To get the rendered contents i'm using this function (found in this forum, I think)
function getEditorValue( instanceName ) { // Get the editor instance that we want to interact with. var oEditor = FCKeditorAPI.GetInstance( instanceName ) ; if (!oEditor){ alert ("No instance named: " + instanceName) return; } // Get the editor contents as XHTML. return oEditor.GetXHTML( true ) ; // "true" means you want it formatted. }
The strange thing is that if I have only one istance, for example description, it works. If I have two istances (description and article) sometimes it's working (10%) sometimes works only the first one (80%) and sometimes only the second one (10%). I noticed that this "bug" is common since surfing over the net a lot of people came across it. But the strange thing is that this bug seems to be "omnipresent" since I can reproduce it with any version of FCK, nightly too. So I wonder why create an instantiable object when you can use only one of that instance?
I'm stuck right now! I use firefox 3.0 with windows vista, cleaning cache often than washing my hands, and firebug listening on production site. The security.fileuri.strict_origin_policy is set to false, too. I don't post (yet) a ticket since as far as I can understand this problems should be already fixed in 2.6.3!
Re: Multiple instances of FckEditor 2.6.3 (nightly) and Ajax