I'm running the demo code for FCK editor and I have the editor appearing in my web page.
I'm now trying take a link to a document and insert it into the FCK editor window in a similar way to fck_link.js
I need to use the oEditor.FCK.CreateLink method but the FCK object is undefined. Here's a bit of my debug code:
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
alert("oEditor is " + oEditor.Name + "\nStatus is " + oEditor.Status );
alert("oEditor.FCK is " + oEditor.FCK);
The first alert box shows me that the oEditor.Name is "FCKeditor1" and that the status is "2" which should be "FCK_STATUS_COMPLETE". This tells me that I do have a proper editor instance.
The next alert box shows me that oEditor.FCK is undefined. This is odd since I know I have an editor created.
I see that the FCK object is defined in 3 places. It's in editor/_source/internals/fck.js and also in fck_gecko.js and fck_ie.js
Since I'm using Firefox I should be accessing the fck.js file. That made me wonder if I'm not set up correctly and there's some reason my code can't see the fck.js file.
However, It appears that my installation is set up correctly because if I use the "Link" button from the default tool bar then the link is properly created. So there must be something my setup that is allowing the internal FCKEditor Link code to call fck.js but not my own code.
Does anyone know why I can't access the oEditor.FCK object and what the solution should be? I've been searching the forums with no success.
Thank you
Greg
I'm now trying take a link to a document and insert it into the FCK editor window in a similar way to fck_link.js
I need to use the oEditor.FCK.CreateLink method but the FCK object is undefined. Here's a bit of my debug code:
var oEditor = FCKeditorAPI.GetInstance('FCKeditor1') ;
alert("oEditor is " + oEditor.Name + "\nStatus is " + oEditor.Status );
alert("oEditor.FCK is " + oEditor.FCK);
The first alert box shows me that the oEditor.Name is "FCKeditor1" and that the status is "2" which should be "FCK_STATUS_COMPLETE". This tells me that I do have a proper editor instance.
The next alert box shows me that oEditor.FCK is undefined. This is odd since I know I have an editor created.
I see that the FCK object is defined in 3 places. It's in editor/_source/internals/fck.js and also in fck_gecko.js and fck_ie.js
Since I'm using Firefox I should be accessing the fck.js file. That made me wonder if I'm not set up correctly and there's some reason my code can't see the fck.js file.
However, It appears that my installation is set up correctly because if I use the "Link" button from the default tool bar then the link is properly created. So there must be something my setup that is allowing the internal FCKEditor Link code to call fck.js but not my own code.
Does anyone know why I can't access the oEditor.FCK object and what the solution should be? I've been searching the forums with no success.
Thank you
Greg