samadhi:
Did you receive a "Can't execute code from a freed script" error? Then check please if an error occures when the instance name have changed.
Some ideas from me and debugger and 5:48 AM...
/_source/fckeditorapi.js:42
We see an FCKeditorAPI object. Every time when we create an editor instance, it add itself to FCKeditorAPI.Instances:
Code:
FCKeditorAPI.Instances[ FCK.Name ] = FCK ;
Stack:
fckeditor.html:172
fckeditorapi.js:139
And every time when a form with editor instances is submitted FCKeditorAPI._FormSubmit (fckeditorapi.js:52) is called. But old instances of editor are in the FCKeditorAPI.Instances container. Frames where they are created are destroyed and anonymous functions such as FCK.GetParentForm based (fck.js:54) destroyed too. When we try to call this function (fckeditorapi.js:57), IE throws the "Can't execute code from a freed script" error.
I haven't find nothing better then destroy an old instances when their form is submitted.
fckeditorapi.js:57
Code:
if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )
oEditor.UpdateLinkedField() ;
I've replacet with this
Code:
if ( oEditor != undefined && oEditor.GetParentForm && oEditor.GetParentForm() == this )
{
oEditor.UpdateLinkedField() ;
FCKeditorAPI.Instances[ name ] = undefined
}
Now my script works fine, but I don't like this solution.
Does anyone have ideas about it?
__ UPDATED __
Hm.. I've solved the problem more easy... Just add "onDestroy" handler to FCKeditor constructor:
Code:
Ext.form.FCKeditor = function(config){
this.config = config;
Ext.form.FCKeditor.superclass.constructor.call(this, config);
this.FCKid=0;
this.MyisLoaded=false;
this.MyValue='';
this.on('destroy', function(){
delete FCKeditorAPI.Instances[ config.name ];
});
};