1 | import { BaseEditor } from 'slate';
|
2 | import { History } from './history';
|
3 |
|
4 |
|
5 |
|
6 | export declare const HISTORY: WeakMap<BaseEditor, History>;
|
7 | export declare const SAVING: WeakMap<BaseEditor, boolean | undefined>;
|
8 | export declare const MERGING: WeakMap<BaseEditor, boolean | undefined>;
|
9 |
|
10 |
|
11 |
|
12 | export interface HistoryEditor extends BaseEditor {
|
13 | history: History;
|
14 | undo: () => void;
|
15 | redo: () => void;
|
16 | writeHistory: (stack: 'undos' | 'redos', batch: any) => void;
|
17 | }
|
18 | export declare const HistoryEditor: {
|
19 | |
20 |
|
21 |
|
22 | isHistoryEditor(value: any): value is HistoryEditor;
|
23 | |
24 |
|
25 |
|
26 | isMerging(editor: HistoryEditor): boolean | undefined;
|
27 | |
28 |
|
29 |
|
30 | isSaving(editor: HistoryEditor): boolean | undefined;
|
31 | |
32 |
|
33 |
|
34 | redo(editor: HistoryEditor): void;
|
35 | |
36 |
|
37 |
|
38 | undo(editor: HistoryEditor): void;
|
39 | |
40 |
|
41 |
|
42 |
|
43 | withMerging(editor: HistoryEditor, fn: () => void): void;
|
44 | |
45 |
|
46 |
|
47 |
|
48 | withoutMerging(editor: HistoryEditor, fn: () => void): void;
|
49 | |
50 |
|
51 |
|
52 |
|
53 | withoutSaving(editor: HistoryEditor, fn: () => void): void;
|
54 | };
|
55 |
|
\ | No newline at end of file |