Friday, January 28, 2011

CKEditor: Using external plugins from an NSF

This is a follow-up to my previous blogpost regarding importing files to an NSF.

If you want to use CKEditor plugins from an NSF, you have to create an override-function for CKEditor.getUrl. The reason for this is that CKEditor automatically adds a timestamp-parameter to the url, which Domino doesn't like.

CKEDITOR_GETURL = function( resource ){
// From NSF - don't alter the url
if( resource.indexOf( '.nsf' ) > -1 ){
return resource;
} else { // Let CKEditor handle the url
return null;
}
}


This function has to be loaded before ckeditor.js.

0 comments: