Files
docmost/packages/editor-ext/src/lib/media-utils.ts
T

16 lines
364 B
TypeScript

import { Editor } from "@tiptap/core";
export type UploadFn = (
file: File,
editor: Editor,
pos: number,
pageId: string,
// only applicable to file attachments
allowMedia?: boolean,
) => void;
export interface MediaUploadOptions {
validateFn?: (file: File, allowMedia?: boolean) => void;
onUpload: (file: File, pageId: string) => Promise<any>;
}