Tuesday, September 20, 2011

Re: [Rails] Rails and CKEditor

On Tue, Sep 20, 2011 at 4:14 PM, Keith Raymond <lists@ruby-forum.com> wrote:
> Has anyone used CKEditor successfully with Rails? Specifically the
> file/image upload?
>
> I have the ckeditor working rather well but this aspect.  I have the
> upload tab on the popup and it allows the user to browse their computer
> for an image and then click "Send to Server"
>
> This is where it breaks.  I get a routing error "No route matches
> "/uploader/upload.php"" which actually makes sense b/c I can't find that
> directory and/or file within the ckeditor files.
>
> Do I need to download these separately?
>                          or
> Do I need to create this upload functionality myself?
Hi Keith,
You have to create the upload functionality yourself and then specify
the upload URL in the CKEditor configuration, like this:
filebrowserUploadUrl: "/gallery/upload"

Also you'll need to create the file browser yourself, and specify it
with the next configuration option:
filebrowserImageBrowseUrl: "/gallery"

Note that the "gallery" and "/gallery/upload" route names are the ones
I've chosen for my app, you can choose whatever you want as long as
they are valid routes for your app.

Hope it helps.

Cheers!

--
Leonardo Mateo.
There's no place like ~

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate