CKEditor, Image Upload (filebrowserUploadUrl)

AnApprentice picture AnApprentice · Jan 22, 2010 · Viewed 177.3k times · Source

I'm using CKEditor and would like to be able to allow users to upload and embed images in the Text Editor...

The following JS is what loads the CKEditor:

CKEDITOR.replace('meeting_notes', {
    startupFocus: true,
    toolbar: [
        ['ajaxsave'],
        ['Bold', 'Italic', 'Underline', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink'],
        ['Cut', 'Copy', 'Paste', 'PasteText'],
        ['Undo', 'Redo', '-', 'RemoveFormat'],
        ['TextColor', 'BGColor'],
        ['Maximize', 'Image']
    ],
    filebrowserUploadUrl: '/notes/add/ajax/upload-inline-image/index.cfm'
});

Where I'm stuck is with filebrowserUploadUrl. What is that URL supposed to return to CKEditor to get this process to work?

Thanks

Answer

Penuel picture Penuel · Mar 5, 2010

The URL should point to your own custom filebrowser url you might have.

I have already done this in one of my projects, and I have posted a tutorial on this topic on my blog

http://www.mixedwaves.com/2010/02/integrating-fckeditor-filemanager-in-ckeditor/

The tutorial gives a step by step instructions about how to integrate the inbuilt FileBrowser of FCKEditor in CKEditor, if you don't want to make our own. Its pretty simple.