Hi,
This problem may be easy.
I am not getting that what should i give the parameter of FCKeditor.GetInstance().
I have to add the keypress event for IE. I have gone through this link.
viewtopic.php?f=6&t=9845&start=0
some codes are :
function FCKeditor_OnComplete(editorInstance)
{
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
// Get the Editor Area DOM (Document object).
var oDOM = oEditor.EditorDocument ;
if ( document.all ) // If Internet Explorer.
{
oDOM.attachEvent("onkeypress",GetLength)
}
else
{
oDOM.addEventListener("keypress",GetLength,false);
}
//editorInstance.Events.AttachEvent( 'OnSelectionChange', GetLength ) ;
}
I have to also know that what is 'FCKeditor1' as a parameter in FCKeditor.GetInstance('FCKeditor1').
Why we are not taking editorInstance parameter of FCKeditor_OnComplete(editorInstance) as the parameter
of FCKeditor.GetInstance(). Because editroInstance is also instance of that FCKeditor.
Tue, 04/21/2009 - 14:30
#1
Re: Parameter of FCKeditorAPI.GetInstance()
I am getting error that oEditor is undefined in Mozilla Firefox and
in eclipse EditorDocument is null or not an object.
Re: Parameter of FCKeditorAPI.GetInstance()
The parameter to GetInstance is the name of the editor that you want to retrieve, but as you said, editorInstance is already a valid reference, so any call to FCKeditorAPI in such situation is a waste of time.
I have seen also some people that in order to call the GetInstance they use the name provided in the editorInstance, I can't understand how anybody would get to write such code!
Re: Parameter of FCKeditorAPI.GetInstance()
It's good to see your reply.
Can you describe me in detail to come over that problem?
I get error that oEditor is undefined in Mozilla Firefox and
in eclipse EditorDocument is null or not an object.
Re: Parameter of FCKeditorAPI.GetInstance()
of course it won't return a valid object if you don't call it with the proper name. Why don't you use the editorInstance?