fantasy-editor
Version:
A React Rich Text Editor Based On Slate
10 lines (9 loc) • 395 B
TypeScript
import { Editor } from 'slate';
export interface FileProps {
name: string;
url: string;
status?: 'finish' | 'pending' | 'error';
}
export declare const mockUpload: (file: File, onProcess: Function) => Promise<FileProps>;
export declare const insertFile: (editor: Editor, file: FileProps) => void;
export declare const insertImage: (editor: Editor, file: FileProps) => void;