JVMartin / angel-core

Angel is a CMS built on top of Laravel 4.
MIT License
45 stars 9 forks source link

Base64 encoded images in CKeditor. #1

Closed jqr108 closed 9 years ago

jqr108 commented 10 years ago

Had a client drag an image into a ckeditor field for a page. At least in Firefox, the image is base64 encoded by default. When the image is too big this exceeds mysql's text field size, which breaks the html and the changelog, causing an fatal error on the edit page (and the client to panic).

This might be one solution: http://ckeditor.com/addon/imagepaste

jqr108 commented 10 years ago

Haha, GitHub comments have drag&drop uploads in their text fields.

JVMartin commented 10 years ago

Thanks for opening this issue, James.

I installed the plugin, but dragging and dropping images into the CKEditor on my Firefox (Linux Mint) still does the base64 encoding. Have you perhaps been able to get it to work on your mac? I'll try it in windows next time I'm there.

I'm also not sure what its dependencies are...

You just need to have a QuickUploader configured in CKEditor and add this plugin, then it will take care of convert the pasted images with Firefox into normal files stored at your server.

I'm not sure what he means by this, because on his site he says that this ImagePaste is just the public version of his paid plugin, but that it should work without any dependencies. Perhaps it just doesn't work with 4.4, it's untested and others were complaining about issues. Perhaps shelling out the 120 euros for the paid version would work.

Another option would be to shell out $290 for this Quick Image Upload plugin. We'd need the ultimate license here in order to include it in a distributed CMS like this.

I still feel like KCFinder works really well for us though, and it might be hairy or confusing to have 2 image upload systems, but I won't dismiss it as a potential solution yet. Users are currently free to drag and drop images and files into KCFinder with no problems, but at least for now they need to be trained not to drag and drop into CKEditor, just into the KCFinder.

JVMartin commented 9 years ago

For now, since CKEditor doesn't support drag-and-drop to upload in a cross-browser way, I'm just going to suggest that we train all clients to use KCFinder. There, they can drag and drop if they want.