Closed megacherry closed 1 year ago
Ref: INT-3177
This question should be asked on the tinymce
repository as it is related to TinyMCE not this react integration.
The interfaces are available but you have to go via the editor options.
// get the type from the tinymce repository
import { EditorOptions } from 'tinymce';
// when you assign the upload handler type it will give blob and progress the correct types
const upload: EditorOptions['images_upload_handler'] = async (blob, progress) => {
return "image.jpg";
}
Alternatively you can extract the BlobInfo
type from the method parameters:
type BlobInfo = Parameters<NonNullable<EditorOptions['images_upload_handler']>>[0];
Thank you :)
I just wrote a function that handles the upload and need the BlobInfo interface for it. Unfortunately the interfaces are not exported.
Can interfaces be exported?