UNPKG

@lobehub/editor

Version:

A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.

16 lines (15 loc) 978 B
import type { IServiceID } from "../../../types"; export declare const UPLOAD_PRIORITY_LOW = 2; export declare const UPLOAD_PRIORITY_MEDIUM = 1; export declare const UPLOAD_PRIORITY_HIGH = 0; export type UPLOAD_PRIORITY = typeof UPLOAD_PRIORITY_LOW | typeof UPLOAD_PRIORITY_MEDIUM | typeof UPLOAD_PRIORITY_HIGH; export interface IUploadService { registerUpload(handler: (file: File, from: string, range: Range | null | undefined) => Promise<boolean | null>, priority?: UPLOAD_PRIORITY): void; uploadFile(file: File, from: string, range: Range | null | undefined): Promise<boolean>; } export declare const IUploadService: IServiceID<IUploadService>; export declare class UploadService implements IUploadService { private uploadHandlers; registerUpload(handler: (file: File, from: string, range: Range | null | undefined) => Promise<boolean>, priority?: number): void; uploadFile(file: File, from: string, range: Range | null | undefined): Promise<boolean>; }