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!
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 });
You have to add following property to enable drag and drop
tinymce.init({ selector: "#imgedit", // change this value according to your HTML plugins: "paste", menubar: "edit", toolbar: "paste", paste_data_images: true });
and if you want to add drag and drop with insert url of image functionality then add below line of code
tinymce.init({ selector: "#imgedit", // change this value according to your HTML toolbar: "image,paste", plugins: "image,paste", menubar: "insert,edit", paste_data_images: true, });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With