How can i handle properly FCKeditor_OnComplete in multiple intances case?
I'm working on ASP.NET control that includes an instance of FCKeditor, and i must handle every OnComplate in separate fucntion.
Is it possible to do this?
The point is that i cannot write to the page new FCKeditor_OnComplete function with every instance of the control. and more than that, the page can content another (third party) contorl that using FCKeditor and adding another FCKeditor_OnComplete to the page, so the result will be multiple FCKeditor_OnComplete functions...
I looking for solution like this:
I'm working on ASP.NET control that includes an instance of FCKeditor, and i must handle every OnComplate in separate fucntion.
Is it possible to do this?
The point is that i cannot write to the page new FCKeditor_OnComplete function with every instance of the control. and more than that, the page can content another (third party) contorl that using FCKeditor and adding another FCKeditor_OnComplete to the page, so the result will be multiple FCKeditor_OnComplete functions...
I looking for solution like this:
var fck = new FCKeditor(name, "100%", "200px", "ForumEditor");
fck.BasePath = "fckeditor/";
fck.onComplate = function() { alert("complate!") }

Re: Handeling FCKeditor_OnComplete in component case
Re: Handeling FCKeditor_OnComplete in component case
If the page can also contain a third-party instance of the FCKeditor_OnComplete() function that isn't in some way knowledgeable of your code, then you are probably in "bad shape".
Otherwise, you could write the following (pseudo-metacode)
var fck_oncompletes = new Object; function register_oncomplete(instancename, ocfunction) { fck_oncompletes.instancename = ocfunction; } function FCKeditor_OnComplete (editorInstance) { if ( fck_oncompletes[editorInstance.Name] ) { fck_oncompletes[editorInstance.Name](); } }