UNPKG

674 BTypeScriptView Raw
1import React from 'react';
2import { Descendant, Selection } from 'slate';
3import { ReactEditor } from '../plugin/react-editor';
4/**
5 * A wrapper around the provider to handle `onChange` events, because the editor
6 * is a mutable singleton so it won't ever register as "changed" otherwise.
7 */
8export declare const Slate: (props: {
9 editor: ReactEditor;
10 initialValue: Descendant[];
11 children: React.ReactNode;
12 onChange?: ((value: Descendant[]) => void) | undefined;
13 onSelectionChange?: ((selection: Selection) => void) | undefined;
14 onValueChange?: ((value: Descendant[]) => void) | undefined;
15}) => React.JSX.Element;
16//# sourceMappingURL=slate.d.ts.map
\No newline at end of file