GetmeUK / ContentTools

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

Image handling - is drag and drop possible? #418

Closed ScotsScripts closed 7 years ago

ScotsScripts commented 7 years ago

First, ContentTools is amazing. You guys have done a fantastic job! I've been using Redactor for years in my projects but I'm going to try ContentTools in a current project.

If ContentTools is being used for a blogging platform, then drag and drop images into the content is a standard feature that bloggers expect to be there.

Has anyone experimented with making the image upload modal drag and drop ready, or better yet, drag and drop into the content?

Is the code in the image upload example/tutorial open ended enough to integrate another library such as fine-uploader.js which is a super smooth drag and drop plugin? Where would I start? I'm not a javascript guru but I can get around if I have an example to look at.

anthonyjb commented 7 years ago

Hey @ScotsScripts - thanks ever so much for the kind words.

So drag and drop image support aren't in place in the ContentTools editor app right now, however this is something we'd like to add . We do have a number of fairly big new features coming to ContentTools shortly but I'm afraid image drag/drop support isn't one of them so it may be some time until its added.

I don't think it would be hugely difficult to add this feature even ahead of us adding it to the official library, for the most part all the code you need is within the example image uploader code provided in the sandbox library and the tutorial.