Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 848 Bytes

File metadata and controls

22 lines (18 loc) · 848 Bytes

editimage_fetch_image

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)

Example: using editimage_fetch_image

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(...));
  })
});