kindeditor.d.ts
1.1 KB
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
declare module "kindeditor" {
namespace KindEditor {
interface KindEditorOptions {
items?: string[];
allowFileManager?: boolean;
width?: string | number;
height?: string | number;
minWidth?: number;
minHeight?: number;
themeType?: "default" | "simple";
resizeType?: 0 | 1 | 2;
langType?: string;
filterMode?: boolean;
urlType?: string;
newlineTag?: "p" | "br";
pasteType?: 0 | 1 | 2 | 3;
afterChange?: (html: string) => void;
afterCreate?: () => void;
}
interface KindEditorEditor {
html(html?: string): string;
sync(): void;
loadPlugin(name: string, callback: () => void): void;
remove(): void;
destroy(): void;
}
interface KindEditorStatic {
create(
element: string | HTMLElement,
options?: KindEditorOptions,
): KindEditorEditor;
createEditor(
element: string | HTMLElement,
options?: KindEditorOptions,
): KindEditorEditor;
version: string;
}
}
const KindEditor: KindEditorStatic;
export default KindEditor;
}