views:

755

answers:

1

Can anyone recommend a way of creating a view where users can upload images to my app through a WYSIWYG editor?

I've tried solving this using CK Editor and Paperclip but am having lots of trouble... Maybe I'm going about this the wrong way.

If someone's done this before I'd really like to know how! I don't have a editor or file storage mechanism preference so fire away...

+1  A: 

This is all dependent on the WYSIWYG's file upload API. From there, just build an ImagesController to handle requests from that API, use whatever system (Paperclip is good) to handle those files internally, and you should be good to go. You won't find a plug-and-play solution; you'll have to hand-roll it.

Turns out that, with more targeted Google searching, you can find a preexisting solution. Here's one for TinyMCE and Rails. You may, however, end up finding that it doesn't meet your needs, in which case I would not be surprised to find that creating your own solution would be simpler than you expect :)

Matchu
Thanks for the advice! Do you recommend any WYSIWYG editor in particular?
Ganesh Shankar
I've only barely worked with them (I tend to prefer Markdown-type systems), but when I did I used TinyMCE: http://tinymce.moxiecode.com/index.php - someone out there may have more targeted advice, though :)
Matchu
Found a Rails/TinyMCE plugin; added to answer.
Matchu
worked like a charm! Thanks heaps mate, you've solved an issue that's been bothering me for days :)
Ganesh Shankar