Spaces:
Running
Running
File size: 655 Bytes
a771826 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import { BaseEditor, BaseRange, Range, Element } from 'slate';
import { ReactEditor, RenderElementProps } from 'slate-react';
import { HistoryEditor } from 'slate-history';
import { CustomElement, CustomText } from './common';
export type CustomEditor = BaseEditor & ReactEditor & HistoryEditor & {
nodeToDecorations?: Map<Element, Range[]>;
};
export type RenderElementPropsFor<T> = RenderElementProps & {
element: T;
};
declare module 'slate' {
interface CustomTypes {
Editor: CustomEditor;
Element: CustomElement;
Text: CustomText;
Range: BaseRange & {
[key: string]: unknown;
};
}
}
|