CKEditor can be easily integrated with your own file browser.
To connect already compatible file browser with CKEditor (like CKFinder), simply follow the File Browser (Uploader) documentation.
Interaction between CKEditor and File Browser
CKEditor sends automatically some additional arguments to the filebrowser:
-
CKEditor
- name of the CKEditor instance -
langCode
- CKEditor language ("en" for English) -
CKEditorFuncNum
- anonymous function number used to pass the url of a file to CKEditor
CKEditor=editor1&CKEditorFuncNum=1&langCode=en
Passing the URL of selected file
To send back the file url from the external file browser, simply call CKEDITOR.tools.callFunction
and pass there CKEditorFuncNum as the first argument:
CKEDITOR.tools.callFunction( funcNum, fileUrl [, data] );
If data (the third argument) is a string, it will be displayed by CKEditor.