eeed-editor 0.1.22 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +57 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,58 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DefineComponent } from "vue";
|
|
2
|
+
|
|
3
|
+
export type EeedEditorToolBarItem =
|
|
4
|
+
| "undo"
|
|
5
|
+
| "redo"
|
|
6
|
+
| "clear"
|
|
7
|
+
| "formatBrush"
|
|
8
|
+
| "paragraph"
|
|
9
|
+
| "fontSize"
|
|
10
|
+
| "fontFamily"
|
|
11
|
+
| "textColor"
|
|
12
|
+
| "highlight"
|
|
13
|
+
| "bold"
|
|
14
|
+
| "italic"
|
|
15
|
+
| "underline"
|
|
16
|
+
| "strike"
|
|
17
|
+
| "blockquote"
|
|
18
|
+
| "codeBlock"
|
|
19
|
+
| "table"
|
|
20
|
+
| "orderedList"
|
|
21
|
+
| "bulletList"
|
|
22
|
+
| "taskList"
|
|
23
|
+
| "align"
|
|
24
|
+
| "lineHeight"
|
|
25
|
+
| "insert";
|
|
26
|
+
|
|
27
|
+
export interface EeedEditorConfig {
|
|
28
|
+
mode?: "doc" | "page";
|
|
29
|
+
editable?: boolean;
|
|
30
|
+
doc?: {
|
|
31
|
+
page?: {
|
|
32
|
+
mode?: "default" | "A4";
|
|
33
|
+
style?: Record<string, string>;
|
|
34
|
+
};
|
|
35
|
+
toolBar?: {
|
|
36
|
+
visible?: boolean;
|
|
37
|
+
align?: "start" | "center";
|
|
38
|
+
items?: EeedEditorToolBarItem[];
|
|
39
|
+
};
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type EeedEditorOnUploadFile = (file: File) => Promise<string> | string;
|
|
45
|
+
export type EeedEditorOnSave = (title: string, html: string) => Promise<boolean> | boolean;
|
|
46
|
+
export type EeedEditorOnChange = (html: string, text: string, markdown: string) => void;
|
|
47
|
+
|
|
48
|
+
export interface EeedEditorProps {
|
|
49
|
+
title?: string;
|
|
50
|
+
content?: string;
|
|
51
|
+
config?: EeedEditorConfig;
|
|
52
|
+
onUploadFile?: EeedEditorOnUploadFile;
|
|
53
|
+
onSave?: EeedEditorOnSave;
|
|
54
|
+
onChange?: EeedEditorOnChange;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const eeedEditor: DefineComponent<EeedEditorProps>;
|
|
2
58
|
export default eeedEditor;
|