Has anyone added FCKEditor to an xPage yet?

I have played with the DOJO control for a rich text control, but it is missing some features. I use FCKEditor on my forms now and would like to continue to use it in my xPage designs. I have tried adding the main js as a resource to the xPage, but get an error, when running a load event for the the editor.

var oFCKeditor = new FCKeditor( ‘view:_id1:_id2:ContentArea:_id5:contentrtf’ ) ;

oFCKeditor.BasePath = /FCKeditor/ ; oFCKeditor.ReplaceTextarea()

Error:

Error while executing JavaScript action expression

Script interpreter error, line=1, col=22: Reference error: ‘FCKeditor’ not found

Anyone have any ideas or have you been able to get this to work?

Thanks, Darin

Subject: Adding an onload handler

Hi Darin,

From your error message I think you’re running that script on the server instead of on the client.

To add this to your app I would use the dojo.addOnLoad() function to register a client side onload event handler.

For example if you create a client-side script file and paste the following code into it, it should allow you to load the FCK editor.

(function(){

function initFCK(){var oFCKeditor = new 

	FCKeditor( 'view:_id1:_id2:ContentArea:_id5:contentrtf');

oFCKeditor.BasePath = /FCKeditor/;

oFCKeditor.ReplaceTextarea()



};

dojo.addOnLoad(initFCK);

})();