tinyMCE can no longer drag and drop images after upgrading from version 3 to version 4

chiliNUT picture chiliNUT · Jan 13, 2014 · Viewed 15.1k times · Source

My website was using the version 3 of tiny mce. One feature it had was that a user could drag an image into the editor, and it would automatically convert it to a base64 data-uri and insert it into the editor. I have just upgraded to version 4, and this functionality seems to be completely gone.

AFAIK, it was not a plugin or anything controlling this, just part of the default functionality, because I was still able to do it when initializing with minimal options, like this:

  tinyMCE.init({mode: "none"});
  tinyMCE.execCommand('mceAddControl', false, 'selector');

Was this feature removed from version 4, or is there a way to turn it back on?

I really want to upgrade to 4, but this is the only thing stopping me, as the image feature is crucial for my application.

Thanks!

Answer

Christophe Eblé picture Christophe Eblé · Feb 3, 2014

If you want to enable the image drag & drop feature you have to do it explicitly with the code below.

tinymce.init({
    ...
    paste_data_images: true
});