UNPKG

667 BTypeScriptView Raw
1/// <reference types="react" />
2import { Editor } from 'slate';
3import { ReactEditor } from '../plugin/react-editor';
4/**
5 * A React context for sharing the editor object, in a way that re-renders the
6 * context whenever changes occur.
7 */
8export interface SlateContextValue {
9 v: number;
10 editor: ReactEditor;
11}
12export declare const SlateContext: import("react").Context<{
13 v: number;
14 editor: ReactEditor;
15} | null>;
16/**
17 * Get the current editor object from the React context.
18 */
19export declare const useSlate: () => Editor;
20export declare const useSlateWithV: () => {
21 v: number;
22 editor: ReactEditor;
23};
24//# sourceMappingURL=use-slate.d.ts.map
\No newline at end of file