import {Editor} from 'slate' import {ReactEditor} from '5e-slate-react' import {HistoryEditor} from 'slate-history' // 编辑器类型 export type EditorType = Editor & ReactEditor & HistoryEditor // 编辑器 context 类型 export type EditorContextProps = { editor: EditorType } // 触发编辑器 键盘输入事件 export type KeyboardEventProcessor = (editor: EditorContextProps, format: string) => void | false // editorDecorator export type EditorDecorator = (editor: EditorType) => EditorType