-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathConfig.ts
More file actions
45 lines (38 loc) · 977 Bytes
/
Config.ts
File metadata and controls
45 lines (38 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import type { EditorConfig } from '@editorjs/editorjs';
import type { EditorJSModel } from '@editorjs/model';
/**
* Editor.js configuration
*/
export interface CoreConfig extends EditorConfig {
/**
* Element to insert the editor into. By default #editorjs
*/
holder?: HTMLElement;
/**
* DEV MODE ONLY
*
* Allows to subscribe to model updates. Used in playground for visualizing model changes
* @param model - EditorJSModel instance
*/
onModelUpdate?: (model: EditorJSModel) => void;
/**
* Current user's identifier
*
* If not passed, a random one will be generated
*/
userId?: string | number;
/**
* Document identifier
*
* If not passed, a random one will be generated
*/
documentId?: string;
/**
* Collaboration server address
*/
collaborationServer?: string;
}
/**
* After validation we can be sure that all required fields are set
*/
export type CoreConfigValidated = Required<CoreConfig>;