import { Plugin } from 'prosemirror-state'; import { IpfsImageUploadResponse } from '../../../types.ts'; export type UploadFnType = (image: File) => Promise; /** * This function creates a Prosemirror plugin that handles pasting and dropping of media files. * It accepts an upload function as a parameter which is used to upload the media files. * The plugin prevents the default paste and drop event, uploads the media file (if an upload function is provided), * creates a new node with the uploaded media file and replaces the current selection with the new node. * If no upload function is provided, it reads the media file as DataURL and uses this in the new node. * The function returns a new instance of the Plugin. */ export declare const getMediaPasteDropPlugin: (onError: (error: string) => void, ipfsImageUploadFn?: (file: File) => Promise) => Plugin;