md-editor-v3 4.11.2 → 4.12.0-beta.0
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/README.md +11 -1
- package/lib/cjs/DropdownToolbar.cjs +1 -1
- package/lib/cjs/MdCatalog.cjs +1 -1
- package/lib/cjs/MdEditor.cjs +7 -7
- package/lib/cjs/MdModal.cjs +1 -1
- package/lib/cjs/MdPreview.cjs +1 -1
- package/lib/cjs/ModalToolbar.cjs +1 -1
- package/lib/cjs/chunks/config.cjs +1 -1
- package/lib/cjs/chunks/index.cjs +7 -7
- package/lib/cjs/chunks/index4.cjs +2 -2
- package/lib/cjs/index.cjs +1 -1
- package/lib/es/DropdownToolbar.mjs +2 -5
- package/lib/es/MdCatalog.mjs +18 -18
- package/lib/es/MdEditor.mjs +173 -172
- package/lib/es/MdModal.mjs +2 -7
- package/lib/es/MdPreview.mjs +2 -13
- package/lib/es/ModalToolbar.mjs +8 -10
- package/lib/es/chunks/config.mjs +23 -24
- package/lib/es/chunks/index.mjs +178 -147
- package/lib/es/chunks/index4.mjs +22 -18
- package/lib/es/index.mjs +23 -43
- package/lib/preview.css +1 -1
- package/lib/style.css +1 -1
- package/lib/types/DropdownToolbar/index.d.ts +8 -8
- package/lib/types/MdCatalog/CatalogLink.d.ts +1 -1
- package/lib/types/MdCatalog/MdCatalog.d.ts +1 -1
- package/lib/types/MdCatalog/index.d.ts +5 -5
- package/lib/types/MdEditor/Editor.d.ts +15 -15
- package/lib/types/MdEditor/components/Dropdown/index.d.ts +1 -1
- package/lib/types/MdEditor/components/Modal/Modal.d.ts +2 -2
- package/lib/types/MdEditor/components/Modal/index.d.ts +8 -8
- package/lib/types/MdEditor/components/Popper/index.d.ts +15 -0
- package/lib/types/MdEditor/config.d.ts +3 -3
- package/lib/types/MdEditor/index.d.ts +68 -68
- package/lib/types/MdEditor/layouts/Content/ContentPreview.d.ts +8 -4
- package/lib/types/MdEditor/layouts/Content/composition/useAttach.d.ts +9 -0
- package/lib/types/MdEditor/layouts/Content/index.d.ts +12 -8
- package/lib/types/MdEditor/layouts/Content/props.d.ts +6 -2
- package/lib/types/MdEditor/layouts/Modals/Link.d.ts +1 -1
- package/lib/types/MdEditor/layouts/Toolbar/index.d.ts +1 -1
- package/lib/types/MdEditor/props.d.ts +2 -2
- package/lib/types/MdEditor/static/env.d.ts +1 -0
- package/lib/types/MdEditor/type.d.ts +7 -1
- package/lib/types/MdEditor/utils/index.d.ts +4 -0
- package/lib/types/MdPreview/MdPreview.d.ts +13 -13
- package/lib/types/MdPreview/index.d.ts +45 -45
- package/lib/types/ModalToolbar/ModalToolbar.d.ts +3 -3
- package/lib/types/ModalToolbar/index.d.ts +16 -16
- package/lib/types/NormalToolbar/index.d.ts +5 -5
- package/lib/umd/index.js +46 -46
- package/package.json +32 -31
|
@@ -6,11 +6,13 @@ declare const _default: {
|
|
|
6
6
|
$props: {
|
|
7
7
|
title?: string | undefined;
|
|
8
8
|
visible?: boolean | undefined;
|
|
9
|
-
onAdjust?: ((val: boolean) => void) | undefined;
|
|
10
|
-
width?: string | undefined;
|
|
11
9
|
height?: string | undefined;
|
|
10
|
+
width?: string | undefined;
|
|
12
11
|
showAdjust?: boolean | undefined;
|
|
13
12
|
isFullscreen?: boolean | undefined;
|
|
13
|
+
onAdjust?: ((val: boolean) => void) | undefined;
|
|
14
|
+
class?: unknown;
|
|
15
|
+
style?: unknown;
|
|
14
16
|
ref?: import("vue").VNodeRef | undefined;
|
|
15
17
|
key?: string | number | symbol | undefined;
|
|
16
18
|
ref_for?: boolean | undefined;
|
|
@@ -53,8 +55,6 @@ declare const _default: {
|
|
|
53
55
|
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
54
56
|
[key: string]: any;
|
|
55
57
|
}>) => void)[] | undefined;
|
|
56
|
-
class?: unknown;
|
|
57
|
-
style?: unknown;
|
|
58
58
|
readonly onClose?: (() => void) | undefined;
|
|
59
59
|
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
60
60
|
};
|
|
@@ -108,11 +108,11 @@ declare const _default: {
|
|
|
108
108
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onClose"[], string, {
|
|
109
109
|
title: string;
|
|
110
110
|
visible: boolean;
|
|
111
|
-
onAdjust: (val: boolean) => void;
|
|
112
|
-
width: string;
|
|
113
111
|
height: string;
|
|
112
|
+
width: string;
|
|
114
113
|
showAdjust: boolean;
|
|
115
114
|
isFullscreen: boolean;
|
|
115
|
+
onAdjust: (val: boolean) => void;
|
|
116
116
|
}, {}, string, {}> & {
|
|
117
117
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
118
118
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -208,11 +208,11 @@ declare const _default: {
|
|
|
208
208
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "onClose"[], "onClose", {
|
|
209
209
|
title: string;
|
|
210
210
|
visible: boolean;
|
|
211
|
-
onAdjust: (val: boolean) => void;
|
|
212
|
-
width: string;
|
|
213
211
|
height: string;
|
|
212
|
+
width: string;
|
|
214
213
|
showAdjust: boolean;
|
|
215
214
|
isFullscreen: boolean;
|
|
215
|
+
onAdjust: (val: boolean) => void;
|
|
216
216
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
217
217
|
install: (app: App) => App;
|
|
218
218
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
declare const Popper: import("vue").DefineComponent<{
|
|
3
|
+
title: {
|
|
4
|
+
type: PropType<string>;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
}, () => any[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
|
+
title: {
|
|
9
|
+
type: PropType<string>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
}>>, {
|
|
13
|
+
title: string;
|
|
14
|
+
}, {}>;
|
|
15
|
+
export default Popper;
|
|
@@ -4,7 +4,7 @@ export declare const defaultEditorId = "md-editor-v3";
|
|
|
4
4
|
export declare const iconfontSvgUrl = "https://at.alicdn.com/t/c/font_2605852_prouiefeic.js";
|
|
5
5
|
export declare const iconfontClassUrl = "https://at.alicdn.com/t/c/font_2605852_prouiefeic.css";
|
|
6
6
|
export declare const cdnBase = "https://cdnjs.cloudflare.com/ajax/libs";
|
|
7
|
-
export declare const highlightUrl
|
|
7
|
+
export declare const highlightUrl = "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js";
|
|
8
8
|
export declare const prettierUrl: {
|
|
9
9
|
main: string;
|
|
10
10
|
markdown: string;
|
|
@@ -13,11 +13,11 @@ export declare const cropperUrl: {
|
|
|
13
13
|
css: string;
|
|
14
14
|
js: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const screenfullUrl
|
|
16
|
+
export declare const screenfullUrl = "https://cdnjs.cloudflare.com/ajax/libs/screenfull.js/5.2.0/screenfull.min.js";
|
|
17
17
|
export declare const allToolbar: string[];
|
|
18
18
|
export declare const allFooter: Array<Footers>;
|
|
19
19
|
export declare const staticTextDefault: StaticTextDefault;
|
|
20
|
-
export declare const mermaidUrl
|
|
20
|
+
export declare const mermaidUrl = "https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.6.1/mermaid.esm.min.mjs";
|
|
21
21
|
export declare const katexUrl: {
|
|
22
22
|
js: string;
|
|
23
23
|
css: string;
|
|
@@ -4,15 +4,11 @@ declare const _default: {
|
|
|
4
4
|
$: import("vue").ComponentInternalInstance;
|
|
5
5
|
$data: {};
|
|
6
6
|
$props: {
|
|
7
|
-
language?: string | undefined;
|
|
8
|
-
theme?: import("./type").Themes | undefined;
|
|
9
|
-
editorId?: string | undefined;
|
|
10
|
-
class?: string | undefined;
|
|
11
|
-
style?: string | import("vue").CSSProperties | undefined;
|
|
12
|
-
mdHeadingId?: import("./type").MdHeadingId | undefined;
|
|
13
7
|
preview?: boolean | undefined;
|
|
14
8
|
pageFullscreen?: boolean | undefined;
|
|
15
9
|
htmlPreview?: boolean | undefined;
|
|
10
|
+
class?: string | undefined;
|
|
11
|
+
style?: string | import("vue").CSSProperties | undefined;
|
|
16
12
|
toolbars?: import("./type").ToolbarNames[] | undefined;
|
|
17
13
|
toolbarsExclude?: import("./type").ToolbarNames[] | undefined;
|
|
18
14
|
noPrettier?: boolean | undefined;
|
|
@@ -24,8 +20,12 @@ declare const _default: {
|
|
|
24
20
|
showToolbarName?: boolean | undefined;
|
|
25
21
|
inputBoxWitdh?: string | undefined;
|
|
26
22
|
modelValue?: string | undefined;
|
|
23
|
+
theme?: import("./type").Themes | undefined;
|
|
24
|
+
language?: string | undefined;
|
|
25
|
+
editorId?: string | undefined;
|
|
27
26
|
showCodeRowNumber?: boolean | undefined;
|
|
28
27
|
previewTheme?: string | undefined;
|
|
28
|
+
mdHeadingId?: import("./type").MdHeadingId | undefined;
|
|
29
29
|
sanitize?: ((html: string) => string) | undefined;
|
|
30
30
|
noMermaid?: boolean | undefined;
|
|
31
31
|
noKatex?: boolean | undefined;
|
|
@@ -38,7 +38,26 @@ declare const _default: {
|
|
|
38
38
|
customIcon?: import("./type").CustomIcon | undefined;
|
|
39
39
|
sanitizeMermaid?: ((h: string) => Promise<string>) | undefined;
|
|
40
40
|
readonly onChange?: import("./type").ChangeEvent | undefined;
|
|
41
|
-
|
|
41
|
+
readonly onSave?: import("./type").SaveEvent | undefined;
|
|
42
|
+
readonly onUploadImg?: import("./type").UploadImgEvent | undefined;
|
|
43
|
+
readonly onHtmlChanged?: import("./type").HtmlChangedEvent | undefined;
|
|
44
|
+
readonly onGetCatalog?: import("./type").GetCatalogEvent | undefined;
|
|
45
|
+
readonly onError?: import("./type").ErrorEvent | undefined;
|
|
46
|
+
readonly onBlur?: ((event: FocusEvent) => void) | undefined;
|
|
47
|
+
readonly onFocus?: ((event: FocusEvent) => void) | undefined;
|
|
48
|
+
readonly onInput?: ((event: Event) => void) | undefined;
|
|
49
|
+
readonly onDrop?: ((event: DragEvent) => void) | undefined;
|
|
50
|
+
readonly onInputBoxWitdhChange?: ((width: string) => void) | undefined;
|
|
51
|
+
readonly defToolbars?: string | JSX.Element | undefined;
|
|
52
|
+
readonly defFooters?: string | JSX.Element | undefined;
|
|
53
|
+
readonly noUploadImg?: boolean | undefined;
|
|
54
|
+
readonly autoFocus?: boolean | undefined;
|
|
55
|
+
readonly disabled?: boolean | undefined;
|
|
56
|
+
readonly readOnly?: boolean | undefined;
|
|
57
|
+
readonly maxLength?: number | undefined;
|
|
58
|
+
readonly autoDetectCode?: boolean | undefined;
|
|
59
|
+
readonly completions?: import("@codemirror/autocomplete").CompletionSource[] | undefined;
|
|
60
|
+
readonly noIconfont?: boolean | undefined;
|
|
42
61
|
ref?: import("vue").VNodeRef | undefined;
|
|
43
62
|
key?: string | number | symbol | undefined;
|
|
44
63
|
ref_for?: boolean | undefined;
|
|
@@ -81,37 +100,18 @@ declare const _default: {
|
|
|
81
100
|
}>) => void) | ((vnode: import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
82
101
|
[key: string]: any;
|
|
83
102
|
}>) => void)[] | undefined;
|
|
84
|
-
|
|
85
|
-
readonly onFocus?: ((event: FocusEvent) => void) | undefined;
|
|
86
|
-
readonly onBlur?: ((event: FocusEvent) => void) | undefined;
|
|
87
|
-
readonly onInput?: ((event: Event) => void) | undefined;
|
|
88
|
-
readonly onError?: import("./type").ErrorEvent | undefined;
|
|
89
|
-
readonly onSave?: import("./type").SaveEvent | undefined;
|
|
90
|
-
readonly onUploadImg?: import("./type").UploadImgEvent | undefined;
|
|
91
|
-
readonly defToolbars?: string | JSX.Element | undefined;
|
|
92
|
-
readonly defFooters?: string | JSX.Element | undefined;
|
|
93
|
-
readonly noUploadImg?: boolean | undefined;
|
|
94
|
-
readonly autoFocus?: boolean | undefined;
|
|
95
|
-
readonly disabled?: boolean | undefined;
|
|
96
|
-
readonly readOnly?: boolean | undefined;
|
|
97
|
-
readonly maxLength?: number | undefined;
|
|
98
|
-
readonly autoDetectCode?: boolean | undefined;
|
|
99
|
-
readonly completions?: import("@codemirror/autocomplete").CompletionSource[] | undefined;
|
|
100
|
-
readonly onInputBoxWitdhChange?: ((width: string) => void) | undefined;
|
|
101
|
-
readonly onHtmlChanged?: import("./type").HtmlChangedEvent | undefined;
|
|
102
|
-
readonly onGetCatalog?: import("./type").GetCatalogEvent | undefined;
|
|
103
|
-
readonly noIconfont?: boolean | undefined;
|
|
104
|
-
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
105
|
-
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
106
|
-
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
107
|
-
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
108
|
-
onOnError?: ((...args: any[]) => any) | undefined;
|
|
103
|
+
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
109
104
|
onOnSave?: ((...args: any[]) => any) | undefined;
|
|
110
105
|
onOnUploadImg?: ((...args: any[]) => any) | undefined;
|
|
111
|
-
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
112
106
|
onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
|
|
113
107
|
onOnGetCatalog?: ((...args: any[]) => any) | undefined;
|
|
108
|
+
onOnError?: ((...args: any[]) => any) | undefined;
|
|
114
109
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
110
|
+
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
111
|
+
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
112
|
+
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
113
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
115
115
|
};
|
|
116
116
|
$attrs: {
|
|
117
117
|
[x: string]: unknown;
|
|
@@ -124,7 +124,7 @@ declare const _default: {
|
|
|
124
124
|
}>;
|
|
125
125
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
126
126
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
127
|
-
$emit: (event: "onChange" | "
|
|
127
|
+
$emit: (event: "onChange" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError" | "update:modelValue" | "onBlur" | "onFocus" | "onInput" | "onDrop" | "onInputBoxWitdhChange", ...args: any[]) => void;
|
|
128
128
|
$el: any;
|
|
129
129
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
130
130
|
onChange: {
|
|
@@ -257,7 +257,7 @@ declare const _default: {
|
|
|
257
257
|
};
|
|
258
258
|
editorId: {
|
|
259
259
|
type: import("vue").PropType<string>;
|
|
260
|
-
default: string;
|
|
260
|
+
default: () => string;
|
|
261
261
|
};
|
|
262
262
|
showCodeRowNumber: {
|
|
263
263
|
type: import("vue").PropType<boolean>;
|
|
@@ -324,27 +324,23 @@ declare const _default: {
|
|
|
324
324
|
};
|
|
325
325
|
}>> & {
|
|
326
326
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
327
|
-
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
328
|
-
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
329
|
-
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
330
|
-
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
331
|
-
onOnError?: ((...args: any[]) => any) | undefined;
|
|
332
327
|
onOnSave?: ((...args: any[]) => any) | undefined;
|
|
333
328
|
onOnUploadImg?: ((...args: any[]) => any) | undefined;
|
|
334
|
-
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
335
329
|
onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
|
|
336
330
|
onOnGetCatalog?: ((...args: any[]) => any) | undefined;
|
|
331
|
+
onOnError?: ((...args: any[]) => any) | undefined;
|
|
337
332
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
333
|
+
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
334
|
+
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
335
|
+
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
336
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
337
|
+
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
338
338
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("./type").EditorEmits, string, {
|
|
339
|
-
language: string;
|
|
340
|
-
theme: import("./type").Themes;
|
|
341
|
-
editorId: string;
|
|
342
|
-
class: string;
|
|
343
|
-
style: string | import("vue").CSSProperties;
|
|
344
|
-
mdHeadingId: import("./type").MdHeadingId;
|
|
345
339
|
preview: boolean;
|
|
346
340
|
pageFullscreen: boolean;
|
|
347
341
|
htmlPreview: boolean;
|
|
342
|
+
class: string;
|
|
343
|
+
style: string | import("vue").CSSProperties;
|
|
348
344
|
toolbars: import("./type").ToolbarNames[];
|
|
349
345
|
toolbarsExclude: import("./type").ToolbarNames[];
|
|
350
346
|
noPrettier: boolean;
|
|
@@ -356,8 +352,12 @@ declare const _default: {
|
|
|
356
352
|
showToolbarName: boolean;
|
|
357
353
|
inputBoxWitdh: string;
|
|
358
354
|
modelValue: string;
|
|
355
|
+
theme: import("./type").Themes;
|
|
356
|
+
language: string;
|
|
357
|
+
editorId: string;
|
|
359
358
|
showCodeRowNumber: boolean;
|
|
360
359
|
previewTheme: string;
|
|
360
|
+
mdHeadingId: import("./type").MdHeadingId;
|
|
361
361
|
sanitize: (html: string) => string;
|
|
362
362
|
noMermaid: boolean;
|
|
363
363
|
noKatex: boolean;
|
|
@@ -520,7 +520,7 @@ declare const _default: {
|
|
|
520
520
|
};
|
|
521
521
|
editorId: {
|
|
522
522
|
type: import("vue").PropType<string>;
|
|
523
|
-
default: string;
|
|
523
|
+
default: () => string;
|
|
524
524
|
};
|
|
525
525
|
showCodeRowNumber: {
|
|
526
526
|
type: import("vue").PropType<boolean>;
|
|
@@ -587,17 +587,17 @@ declare const _default: {
|
|
|
587
587
|
};
|
|
588
588
|
}>> & {
|
|
589
589
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
590
|
-
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
591
|
-
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
592
|
-
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
593
|
-
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
594
|
-
onOnError?: ((...args: any[]) => any) | undefined;
|
|
595
590
|
onOnSave?: ((...args: any[]) => any) | undefined;
|
|
596
591
|
onOnUploadImg?: ((...args: any[]) => any) | undefined;
|
|
597
|
-
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
598
592
|
onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
|
|
599
593
|
onOnGetCatalog?: ((...args: any[]) => any) | undefined;
|
|
594
|
+
onOnError?: ((...args: any[]) => any) | undefined;
|
|
600
595
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
596
|
+
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
597
|
+
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
598
|
+
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
599
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
600
|
+
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
601
601
|
} & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & import("vue").ComponentCustomProperties & {};
|
|
602
602
|
__isFragment?: undefined;
|
|
603
603
|
__isTeleport?: undefined;
|
|
@@ -733,7 +733,7 @@ declare const _default: {
|
|
|
733
733
|
};
|
|
734
734
|
editorId: {
|
|
735
735
|
type: import("vue").PropType<string>;
|
|
736
|
-
default: string;
|
|
736
|
+
default: () => string;
|
|
737
737
|
};
|
|
738
738
|
showCodeRowNumber: {
|
|
739
739
|
type: import("vue").PropType<boolean>;
|
|
@@ -800,27 +800,23 @@ declare const _default: {
|
|
|
800
800
|
};
|
|
801
801
|
}>> & {
|
|
802
802
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
803
|
-
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
804
|
-
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
805
|
-
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
806
|
-
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
807
|
-
onOnError?: ((...args: any[]) => any) | undefined;
|
|
808
803
|
onOnSave?: ((...args: any[]) => any) | undefined;
|
|
809
804
|
onOnUploadImg?: ((...args: any[]) => any) | undefined;
|
|
810
|
-
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
811
805
|
onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
|
|
812
806
|
onOnGetCatalog?: ((...args: any[]) => any) | undefined;
|
|
807
|
+
onOnError?: ((...args: any[]) => any) | undefined;
|
|
813
808
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
mdHeadingId: import("./type").MdHeadingId;
|
|
809
|
+
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
810
|
+
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
811
|
+
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
812
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
813
|
+
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
814
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("./type").EditorEmits, "onChange" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError" | "update:modelValue" | "onBlur" | "onFocus" | "onInput" | "onDrop" | "onInputBoxWitdhChange", {
|
|
821
815
|
preview: boolean;
|
|
822
816
|
pageFullscreen: boolean;
|
|
823
817
|
htmlPreview: boolean;
|
|
818
|
+
class: string;
|
|
819
|
+
style: string | import("vue").CSSProperties;
|
|
824
820
|
toolbars: import("./type").ToolbarNames[];
|
|
825
821
|
toolbarsExclude: import("./type").ToolbarNames[];
|
|
826
822
|
noPrettier: boolean;
|
|
@@ -832,8 +828,12 @@ declare const _default: {
|
|
|
832
828
|
showToolbarName: boolean;
|
|
833
829
|
inputBoxWitdh: string;
|
|
834
830
|
modelValue: string;
|
|
831
|
+
theme: import("./type").Themes;
|
|
832
|
+
language: string;
|
|
833
|
+
editorId: string;
|
|
835
834
|
showCodeRowNumber: boolean;
|
|
836
835
|
previewTheme: string;
|
|
836
|
+
mdHeadingId: import("./type").MdHeadingId;
|
|
837
837
|
sanitize: (html: string) => string;
|
|
838
838
|
noMermaid: boolean;
|
|
839
839
|
noKatex: boolean;
|
|
@@ -9,7 +9,9 @@ declare const ContentPreview: import("vue").DefineComponent<{
|
|
|
9
9
|
};
|
|
10
10
|
setting: {
|
|
11
11
|
type: import("vue").PropType<import('../../type').SettingType>;
|
|
12
|
-
default: () => {
|
|
12
|
+
default: () => {
|
|
13
|
+
preview: boolean;
|
|
14
|
+
};
|
|
13
15
|
};
|
|
14
16
|
onHtmlChanged: {
|
|
15
17
|
type: import("vue").PropType<(h: string) => void>;
|
|
@@ -60,7 +62,9 @@ declare const ContentPreview: import("vue").DefineComponent<{
|
|
|
60
62
|
};
|
|
61
63
|
setting: {
|
|
62
64
|
type: import("vue").PropType<import('../../type').SettingType>;
|
|
63
|
-
default: () => {
|
|
65
|
+
default: () => {
|
|
66
|
+
preview: boolean;
|
|
67
|
+
};
|
|
64
68
|
};
|
|
65
69
|
onHtmlChanged: {
|
|
66
70
|
type: import("vue").PropType<(h: string) => void>;
|
|
@@ -105,10 +109,10 @@ declare const ContentPreview: import("vue").DefineComponent<{
|
|
|
105
109
|
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
106
110
|
};
|
|
107
111
|
}>>, {
|
|
108
|
-
mdHeadingId: import('../../type').MdHeadingId;
|
|
109
|
-
modelValue: string;
|
|
110
112
|
onHtmlChanged: (h: string) => void;
|
|
111
113
|
onGetCatalog: (list: import('../../type').HeadList[]) => void;
|
|
114
|
+
modelValue: string;
|
|
115
|
+
mdHeadingId: import('../../type').MdHeadingId;
|
|
112
116
|
sanitize: (html: string) => string;
|
|
113
117
|
noMermaid: boolean;
|
|
114
118
|
noKatex: boolean;
|
|
@@ -65,7 +65,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
65
65
|
};
|
|
66
66
|
setting: {
|
|
67
67
|
type: import("vue").PropType<import('../../type').SettingType>;
|
|
68
|
-
default: () => {
|
|
68
|
+
default: () => {
|
|
69
|
+
preview: boolean;
|
|
70
|
+
};
|
|
69
71
|
};
|
|
70
72
|
onHtmlChanged: {
|
|
71
73
|
type: import("vue").PropType<(h: string) => void>;
|
|
@@ -176,7 +178,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
176
178
|
};
|
|
177
179
|
setting: {
|
|
178
180
|
type: import("vue").PropType<import('../../type').SettingType>;
|
|
179
|
-
default: () => {
|
|
181
|
+
default: () => {
|
|
182
|
+
preview: boolean;
|
|
183
|
+
};
|
|
180
184
|
};
|
|
181
185
|
onHtmlChanged: {
|
|
182
186
|
type: import("vue").PropType<(h: string) => void>;
|
|
@@ -222,15 +226,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
222
226
|
};
|
|
223
227
|
}>>, {
|
|
224
228
|
onChange: (v: string) => void;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
onFocus: (event: FocusEvent) => void;
|
|
229
|
+
onHtmlChanged: (h: string) => void;
|
|
230
|
+
onGetCatalog: (list: import('../../type').HeadList[]) => void;
|
|
228
231
|
onBlur: (event: FocusEvent) => void;
|
|
229
|
-
|
|
232
|
+
onFocus: (event: FocusEvent) => void;
|
|
233
|
+
onDrop: (event: DragEvent) => void;
|
|
230
234
|
placeholder: string;
|
|
231
235
|
modelValue: string;
|
|
232
|
-
|
|
233
|
-
|
|
236
|
+
theme: import('../../type').Themes;
|
|
237
|
+
mdHeadingId: import('../../type').MdHeadingId;
|
|
234
238
|
sanitize: (html: string) => string;
|
|
235
239
|
noMermaid: boolean;
|
|
236
240
|
noKatex: boolean;
|
|
@@ -9,7 +9,9 @@ export declare const contentPreviewProps: {
|
|
|
9
9
|
};
|
|
10
10
|
setting: {
|
|
11
11
|
type: PropType<SettingType>;
|
|
12
|
-
default: () => {
|
|
12
|
+
default: () => {
|
|
13
|
+
preview: boolean;
|
|
14
|
+
};
|
|
13
15
|
};
|
|
14
16
|
onHtmlChanged: {
|
|
15
17
|
type: PropType<(h: string) => void>;
|
|
@@ -127,7 +129,9 @@ export declare const contentProps: {
|
|
|
127
129
|
};
|
|
128
130
|
setting: {
|
|
129
131
|
type: PropType<SettingType>;
|
|
130
|
-
default: () => {
|
|
132
|
+
default: () => {
|
|
133
|
+
preview: boolean;
|
|
134
|
+
};
|
|
131
135
|
};
|
|
132
136
|
onHtmlChanged: {
|
|
133
137
|
type: PropType<(h: string) => void>;
|
|
@@ -91,8 +91,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
91
91
|
toolbarsExclude: ToolbarNames[];
|
|
92
92
|
tableShape: number[];
|
|
93
93
|
setting: import('../../type').SettingType;
|
|
94
|
-
updateSetting: import('../../type').UpdateSetting;
|
|
95
94
|
screenfull: Record<string, any>;
|
|
96
95
|
screenfullJs: string;
|
|
96
|
+
updateSetting: import('../../type').UpdateSetting;
|
|
97
97
|
}, {}>;
|
|
98
98
|
export default _default;
|
|
@@ -58,7 +58,7 @@ export declare const mdPreviewProps: {
|
|
|
58
58
|
*/
|
|
59
59
|
editorId: {
|
|
60
60
|
type: PropType<string>;
|
|
61
|
-
default: string;
|
|
61
|
+
default: () => string;
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
64
64
|
* 预览中代码是否显示行号
|
|
@@ -493,7 +493,7 @@ export declare const editorProps: {
|
|
|
493
493
|
*/
|
|
494
494
|
editorId: {
|
|
495
495
|
type: PropType<string>;
|
|
496
|
-
default: string;
|
|
496
|
+
default: () => string;
|
|
497
497
|
};
|
|
498
498
|
/**
|
|
499
499
|
* 预览中代码是否显示行号
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isServer: boolean;
|
|
@@ -285,7 +285,13 @@ export interface CodeCss {
|
|
|
285
285
|
export type UpdateSetting = (k: keyof SettingType, v?: boolean) => void;
|
|
286
286
|
export type ChangeEvent = (v: string) => void;
|
|
287
287
|
export type SaveEvent = (v: string, h: Promise<string>) => void;
|
|
288
|
-
export type
|
|
288
|
+
export type UploadImgCallBackParam = string[] | Array<{
|
|
289
|
+
url: string;
|
|
290
|
+
alt: string;
|
|
291
|
+
title: string;
|
|
292
|
+
}>;
|
|
293
|
+
export type UploadImgCallBack = (urls: UploadImgCallBackParam) => void;
|
|
294
|
+
export type UploadImgEvent = (files: Array<File>, callBack: UploadImgCallBack) => void;
|
|
289
295
|
export type HtmlChangedEvent = (h: string) => void;
|
|
290
296
|
export type GetCatalogEvent = (list: HeadList[]) => void;
|
|
291
297
|
export type ErrorEvent = (err: InnerError) => void;
|
|
@@ -32,3 +32,7 @@ export declare const splitKatexValue: (str: string, key?: string) => Array<strin
|
|
|
32
32
|
* @returns
|
|
33
33
|
*/
|
|
34
34
|
export declare const getRelativeTop: (element: HTMLElement, container: HTMLElement) => number;
|
|
35
|
+
/**
|
|
36
|
+
* 获取递增的ID
|
|
37
|
+
*/
|
|
38
|
+
export declare const getNextId: (prefix: string) => string;
|
|
@@ -23,7 +23,7 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
23
23
|
};
|
|
24
24
|
editorId: {
|
|
25
25
|
type: import("vue").PropType<string>;
|
|
26
|
-
default: string;
|
|
26
|
+
default: () => string;
|
|
27
27
|
};
|
|
28
28
|
showCodeRowNumber: {
|
|
29
29
|
type: import("vue").PropType<boolean>;
|
|
@@ -88,7 +88,7 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
88
88
|
type: import("vue").PropType<(h: string) => Promise<string>>;
|
|
89
89
|
default: (h: string) => Promise<string>;
|
|
90
90
|
};
|
|
91
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import('../MdEditor/type').EditorEmits, "onChange" | "
|
|
91
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import('../MdEditor/type').EditorEmits, "onChange" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError" | "update:modelValue" | "onBlur" | "onFocus" | "onInput" | "onDrop" | "onInputBoxWitdhChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
92
92
|
modelValue: {
|
|
93
93
|
type: import("vue").PropType<string>;
|
|
94
94
|
default: string;
|
|
@@ -113,7 +113,7 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
113
113
|
};
|
|
114
114
|
editorId: {
|
|
115
115
|
type: import("vue").PropType<string>;
|
|
116
|
-
default: string;
|
|
116
|
+
default: () => string;
|
|
117
117
|
};
|
|
118
118
|
showCodeRowNumber: {
|
|
119
119
|
type: import("vue").PropType<boolean>;
|
|
@@ -180,27 +180,27 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
180
180
|
};
|
|
181
181
|
}>> & {
|
|
182
182
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
183
|
-
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
184
|
-
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
185
|
-
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
186
|
-
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
187
|
-
onOnError?: ((...args: any[]) => any) | undefined;
|
|
188
183
|
onOnSave?: ((...args: any[]) => any) | undefined;
|
|
189
184
|
onOnUploadImg?: ((...args: any[]) => any) | undefined;
|
|
190
|
-
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
191
185
|
onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
|
|
192
186
|
onOnGetCatalog?: ((...args: any[]) => any) | undefined;
|
|
187
|
+
onOnError?: ((...args: any[]) => any) | undefined;
|
|
193
188
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
189
|
+
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
190
|
+
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
191
|
+
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
192
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
193
|
+
onOnInputBoxWitdhChange?: ((...args: any[]) => any) | undefined;
|
|
194
194
|
}, {
|
|
195
|
-
language: string;
|
|
196
|
-
theme: import('../MdEditor/type').Themes;
|
|
197
|
-
editorId: string;
|
|
198
195
|
class: string;
|
|
199
196
|
style: string | import("vue").CSSProperties;
|
|
200
|
-
mdHeadingId: import('../MdEditor/type').MdHeadingId;
|
|
201
197
|
modelValue: string;
|
|
198
|
+
theme: import('../MdEditor/type').Themes;
|
|
199
|
+
language: string;
|
|
200
|
+
editorId: string;
|
|
202
201
|
showCodeRowNumber: boolean;
|
|
203
202
|
previewTheme: string;
|
|
203
|
+
mdHeadingId: import('../MdEditor/type').MdHeadingId;
|
|
204
204
|
sanitize: (html: string) => string;
|
|
205
205
|
noMermaid: boolean;
|
|
206
206
|
noKatex: boolean;
|