With v5 of TinyMCE I can use the following code to insert an image as a base64 string into the editor:
tinymce.init({
paste_data_images: true,
plugins: 'image imagetools',
selector: '#editor',
smart_paste: true,
toolbar: 'image',
file_picker_types: 'image',
images_upload_handler: function (blobInfo, success) {
success('data:' + blobInfo.blob().type + ';base64,' + blobInfo.base64());
}
});
The documentation for v6 specifies images_upload_handler now returns a promise, but I can't get it working. Can anyone point me in the right direction?