(New page: CKEditor can be easily integrated with your own file browser. To connect already compatible file browser with CKEditor (like [http://ckfinder.com CKFinder]), simply follow the [[CKEditor_...) |
|||
Line 14: | Line 14: | ||
=== Passing the URL of selected file === | === Passing the URL of selected file === | ||
− | To send back the file url from | + | To send back the file url from an external file browser, simply call <code>CKEDITOR.tools.callFunction</code> and pass there CKEditorFuncNum as the first argument: |
CKEDITOR.tools.callFunction( funcNum, fileUrl [, data] ); | CKEDITOR.tools.callFunction( funcNum, fileUrl [, data] ); | ||
− | If data (the third argument) is a string, it will be displayed by CKEditor. | + | If data (the third argument) is a string, it will be displayed by CKEditor (usually used to display an error message if problem occurs during file upload). |
Revision as of 09:12, 16 September 2009
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 an 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 (usually used to display an error message if problem occurs during file upload).