tags:

views:

1811

answers:

2

Hello, 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

A: 

That URL will points to your own server-side file upload action. The documentation doesn't go into much detail, but fortunately Don Jones fills in some of the blanks here:

http://stackoverflow.com/questions/1498628/how-can-you-integrate-a-custom-file-browser-uploader-with-ckeditor

See also:

http://zerokspot.com/weblog/2009/09/09/custom-filebrowser-callbacks-ckeditor/

ZoogieZork
Help... I've follwed the instructions below, the the Server is outputting a JavaScript block exactly as above... Problem is that CKEDITOR isn't doing anything with it, the text is simply showing up in the UPLOAD tab, and not switching tabs and taking the URL... Is there a config, or plugin for the callback which I need to make sure is enabled? Thanks!!! –
AnApprentice
Hmmm... not sure, sorry. I posted this answer as a CW just to post the links. :(
ZoogieZork
A: 

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.

Penuel