import React from 'react'; import { DefaultElement, LeafMark } from "./common/type"; import { FileElement } from "./elements/index"; import './App.less'; export interface OnlyBrainEditorProps { value: DefaultElement[]; readonly?: boolean; mentionables?: string[]; onChange?: (value: DefaultElement[]) => void; onUploadError?: (fileName: string) => void; onFileUpload?: (data: Omit) => Promise<{ url: string; name: string; }>; onSubmit?: () => void; onFocus?: () => void; onTagRemove?: (tagName: string, serverId?: string) => void; onTagClick?: (tagName: string, serverId?: string) => void; width: number; } export interface ImperativeHandle { insertFile: (files: FileList) => void; insertBlock: (type: DefaultElement['type'], text?: string, deep?: number) => void; insertLeaf: (mark?: LeafMark, text?: string) => void; clearEditor: () => void; isEmpty: () => boolean; getEditorValue: () => DefaultElement[]; focusEditor: () => void; blur: () => void; getEditorRef: () => HTMLDivElement | null; } declare const OnlyBrainEditor: React.ForwardRefExoticComponent>; export default OnlyBrainEditor;