1 | /**
|
2 | * @description 整合差异备份和内容备份,进行统一管理
|
3 | * @author fangzhicong
|
4 | */
|
5 | import NodeCache from './node';
|
6 | import HtmlCache from './html';
|
7 | import Editor from '../../index';
|
8 | export default class ContentCache {
|
9 | editor: Editor;
|
10 | /**
|
11 | * 内容备份的管理器
|
12 | */
|
13 | cache?: HtmlCache | NodeCache;
|
14 | constructor(editor: Editor);
|
15 | /**
|
16 | * 初始化绑定
|
17 | */
|
18 | observe(): void;
|
19 | /**
|
20 | * 保存
|
21 | */
|
22 | save(mutations: MutationRecord[]): void;
|
23 | /**
|
24 | * 撤销
|
25 | */
|
26 | revoke(): boolean | undefined;
|
27 | /**
|
28 | * 恢复
|
29 | */
|
30 | restore(): boolean | undefined;
|
31 | }
|