forked from codex-team/editor.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editor-config.d.ts
69 lines (57 loc) · 1.4 KB
/
editor-config.d.ts
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import {ToolConstructable, ToolSettings} from '../tools';
import {OutputData} from '../index';
import {SanitizerConfig} from './sanitizer-config';
export interface EditorConfig {
/**
* Element where Editor will be append
* @deprecated property will be removed in next major release, use holder instead
*/
holderId?: string | HTMLElement;
/**
* Element where Editor will be append
*/
holder?: string | HTMLElement;
/**
* If true, set caret at the first Block after Editor is ready
*/
autofocus?: boolean;
/**
* This Tool will be used as default
* Name should be equal to one of Tool`s keys of passed tools
* If not specified, Paragraph Tool will be used
*/
initialBlock?: string;
/**
* First Block placeholder
*/
placeholder?: string|false;
/**
* Define default sanitizer configuration
* @see {@link sanitizer}
*/
sanitizer?: SanitizerConfig;
/**
* If true, toolbar won't be shown
*/
hideToolbar?: boolean;
/**
* Map of Tools to use
*/
tools?: {[toolName: string]: ToolConstructable|ToolSettings};
/**
* Data to render on Editor start
*/
data?: OutputData;
/**
* Height of Editor's bottom area that allows to set focus on the last Block
*/
minHeight?: number;
/**
* Fires when Editor is ready to work
*/
onReady?(): void;
/**
* Fires when something changed in DOM
*/
onChange?(): void;
}