This option can be used to define a custom fetch function, which provides another way to access images in complex situations. The function will be passed the HTML element of the image to be fetched and should return a Promise containing a Blob representation of the image.
Type: Function (Returns a Promise)
tinymce.init({
selector: 'textarea', // change this value according to your HTML
toolbar: 'image',
plugins: 'image editimage',
editimage_fetch_image: (img) => new Promise((resolve) => {
// Fetch the image and return a blob containing the image content
...
resolve(new Blob(...));
})
});