GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.97k stars 398 forks source link

Data URI image uploader #136

Open Qqwy opened 8 years ago

Qqwy commented 8 years ago

Today I patched together an image uploader for ContentTools hat uses Data URIs , which was what seems to be the best solution to the image uploading problem, at least for my use case.

This has the following advantages:

And the following drawbacks:

This code has obviously been written in normal JS and not in CoffeeScript, as I have no experience with writing CoffeeScript at all, but feel free to include it in the project if you want.

In any case, I hope that this might be helpful to someone else as well.

Have a wonderful day,

~Qqwy

anthonyjb commented 8 years ago

Hi @Qqwy this looks like it might be a great replacement for the current sandbox and demo uploader as it would allow people to add genuine images in the demo environments.

I'm sure this could be a interesting starting point for many and I'm def going to have a play with it. Thanks for contributing it :+1:

CapRoberts commented 8 years ago

Sounds great, but have not been able to make this work, how do you incorporate this?

brahma-dev commented 8 years ago

@CapRoberts

Try this gist