md-editor-v3 4.5.0 → 4.6.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 +1 -0
- package/lib/cjs/MdCatalog.cjs +1 -1
- package/lib/cjs/MdEditor.cjs +11 -11
- package/lib/cjs/chunks/index.cjs +6 -6
- package/lib/cjs/chunks/index4.cjs +2 -2
- package/lib/es/MdCatalog.mjs +28 -28
- package/lib/es/MdEditor.mjs +708 -702
- package/lib/es/chunks/index.mjs +206 -201
- package/lib/es/chunks/index4.mjs +64 -46
- package/lib/style.css +1 -1
- package/lib/types/MdEditor/Editor.d.ts +8 -1
- package/lib/types/MdEditor/index.d.ts +18 -2
- package/lib/types/MdEditor/layouts/Content/index.d.ts +9 -0
- package/lib/types/MdEditor/layouts/Content/props.d.ts +4 -0
- package/lib/types/MdEditor/props.d.ts +3 -0
- package/lib/types/MdEditor/static/event-name.d.ts +9 -0
- package/lib/types/MdEditor/type.d.ts +1 -1
- package/lib/types/MdPreview/MdPreview.d.ts +2 -1
- package/lib/types/MdPreview/index.d.ts +6 -2
- package/lib/umd/index.js +41 -41
- package/package.json +2 -2
|
@@ -132,6 +132,9 @@ declare const _default: {
|
|
|
132
132
|
onInput: {
|
|
133
133
|
type: import("vue").PropType<(event: Event) => void>;
|
|
134
134
|
};
|
|
135
|
+
onDrop: {
|
|
136
|
+
type: import("vue").PropType<(event: DragEvent) => void>;
|
|
137
|
+
};
|
|
135
138
|
modelValue: {
|
|
136
139
|
type: import("vue").PropType<string>;
|
|
137
140
|
default: string;
|
|
@@ -219,6 +222,7 @@ declare const _default: {
|
|
|
219
222
|
};
|
|
220
223
|
}>> & {
|
|
221
224
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
225
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
222
226
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
223
227
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
224
228
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -240,7 +244,7 @@ declare const _default: {
|
|
|
240
244
|
}>;
|
|
241
245
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
242
246
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
243
|
-
$emit: (event: "onChange" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", ...args: any[]) => void;
|
|
247
|
+
$emit: (event: "onChange" | "onDrop" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", ...args: any[]) => void;
|
|
244
248
|
$el: any;
|
|
245
249
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
246
250
|
onChange: {
|
|
@@ -339,6 +343,9 @@ declare const _default: {
|
|
|
339
343
|
onInput: {
|
|
340
344
|
type: import("vue").PropType<(event: Event) => void>;
|
|
341
345
|
};
|
|
346
|
+
onDrop: {
|
|
347
|
+
type: import("vue").PropType<(event: DragEvent) => void>;
|
|
348
|
+
};
|
|
342
349
|
modelValue: {
|
|
343
350
|
type: import("vue").PropType<string>;
|
|
344
351
|
default: string;
|
|
@@ -426,6 +433,7 @@ declare const _default: {
|
|
|
426
433
|
};
|
|
427
434
|
}>> & {
|
|
428
435
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
436
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
429
437
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
430
438
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
431
439
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -584,6 +592,9 @@ declare const _default: {
|
|
|
584
592
|
onInput: {
|
|
585
593
|
type: import("vue").PropType<(event: Event) => void>;
|
|
586
594
|
};
|
|
595
|
+
onDrop: {
|
|
596
|
+
type: import("vue").PropType<(event: DragEvent) => void>;
|
|
597
|
+
};
|
|
587
598
|
modelValue: {
|
|
588
599
|
type: import("vue").PropType<string>;
|
|
589
600
|
default: string;
|
|
@@ -671,6 +682,7 @@ declare const _default: {
|
|
|
671
682
|
};
|
|
672
683
|
}>> & {
|
|
673
684
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
685
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
674
686
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
675
687
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
676
688
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -781,6 +793,9 @@ declare const _default: {
|
|
|
781
793
|
onInput: {
|
|
782
794
|
type: import("vue").PropType<(event: Event) => void>;
|
|
783
795
|
};
|
|
796
|
+
onDrop: {
|
|
797
|
+
type: import("vue").PropType<(event: DragEvent) => void>;
|
|
798
|
+
};
|
|
784
799
|
modelValue: {
|
|
785
800
|
type: import("vue").PropType<string>;
|
|
786
801
|
default: string;
|
|
@@ -868,6 +883,7 @@ declare const _default: {
|
|
|
868
883
|
};
|
|
869
884
|
}>> & {
|
|
870
885
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
886
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
871
887
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
872
888
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
873
889
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -877,7 +893,7 @@ declare const _default: {
|
|
|
877
893
|
onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
|
|
878
894
|
onOnGetCatalog?: ((...args: any[]) => any) | undefined;
|
|
879
895
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
880
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("./type").EditorEmits, "onChange" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", {
|
|
896
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("./type").EditorEmits, "onChange" | "onDrop" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", {
|
|
881
897
|
editorId: string;
|
|
882
898
|
class: string;
|
|
883
899
|
style: string | import("vue").CSSProperties;
|
|
@@ -49,6 +49,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
49
|
onInput: {
|
|
50
50
|
type: import("vue").PropType<(event: Event) => void>;
|
|
51
51
|
};
|
|
52
|
+
onDrop: {
|
|
53
|
+
type: import("vue").PropType<(event: DragEvent) => void>;
|
|
54
|
+
default: () => void;
|
|
55
|
+
};
|
|
52
56
|
modelValue: {
|
|
53
57
|
type: import("vue").PropType<string>;
|
|
54
58
|
default: string;
|
|
@@ -147,6 +151,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
147
151
|
onInput: {
|
|
148
152
|
type: import("vue").PropType<(event: Event) => void>;
|
|
149
153
|
};
|
|
154
|
+
onDrop: {
|
|
155
|
+
type: import("vue").PropType<(event: DragEvent) => void>;
|
|
156
|
+
default: () => void;
|
|
157
|
+
};
|
|
150
158
|
modelValue: {
|
|
151
159
|
type: import("vue").PropType<string>;
|
|
152
160
|
default: string;
|
|
@@ -196,6 +204,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
196
204
|
};
|
|
197
205
|
}>>, {
|
|
198
206
|
onChange: (v: string) => void;
|
|
207
|
+
onDrop: (event: DragEvent) => void;
|
|
199
208
|
onFocus: (event: FocusEvent) => void;
|
|
200
209
|
onBlur: (event: FocusEvent) => void;
|
|
201
210
|
mdHeadingId: import("../../type").MdHeadingId;
|
|
@@ -108,6 +108,10 @@ export declare const contentProps: {
|
|
|
108
108
|
onInput: {
|
|
109
109
|
type: PropType<(event: Event) => void>;
|
|
110
110
|
};
|
|
111
|
+
onDrop: {
|
|
112
|
+
type: PropType<(event: DragEvent) => void>;
|
|
113
|
+
default: () => void;
|
|
114
|
+
};
|
|
111
115
|
modelValue: {
|
|
112
116
|
type: PropType<string>;
|
|
113
117
|
default: string;
|
|
@@ -7,3 +7,12 @@ export declare const PREVIEW_CHANGED = "previewChanged";
|
|
|
7
7
|
export declare const HTML_PREVIEW_CHANGED = "htmlPreviewChanged";
|
|
8
8
|
export declare const CATALOG_VISIBLE_CHANGED = "catalogVisibleChanged";
|
|
9
9
|
export declare const TEXTAREA_FOCUS = "textareaFocus";
|
|
10
|
+
export declare const BUILD_FINISHED = "buildFinished";
|
|
11
|
+
export declare const ERROR_CATCHER = "errorCatcher";
|
|
12
|
+
export declare const REPLACE = "replace";
|
|
13
|
+
export declare const UPLOAD_IMAGE = "uploadImage";
|
|
14
|
+
export declare const OPEN_MODALS = "openModals";
|
|
15
|
+
export declare const CTRL_Z = "ctrlZ";
|
|
16
|
+
export declare const CTRL_SHIFT_Z = "ctrlShiftZ";
|
|
17
|
+
export declare const CATALOG_CHANGED = "catalogChanged";
|
|
18
|
+
export declare const PUSH_CATALOG = "pushCatalog";
|
|
@@ -370,7 +370,7 @@ export interface ExposeParam {
|
|
|
370
370
|
}
|
|
371
371
|
export type EditorProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof editorProps>>>>;
|
|
372
372
|
export type MdPreviewProps = Readonly<LooseRequired<Readonly<ExtractPropTypes<typeof mdPreviewProps>>>>;
|
|
373
|
-
export type EditorEmits = Array<'onChange' | 'onSave' | 'onUploadImg' | 'onHtmlChanged' | 'onGetCatalog' | 'onError' | 'update:modelValue' | 'onBlur' | 'onFocus' | 'onInput'>;
|
|
373
|
+
export type EditorEmits = Array<'onChange' | 'onSave' | 'onUploadImg' | 'onHtmlChanged' | 'onGetCatalog' | 'onError' | 'update:modelValue' | 'onBlur' | 'onFocus' | 'onInput' | 'onDrop'>;
|
|
374
374
|
export type EditorContext = SetupContext<EditorEmits>;
|
|
375
375
|
/**
|
|
376
376
|
* 自定义图标的数据类型
|
|
@@ -84,7 +84,7 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
84
84
|
type: import("vue").PropType<import('../MdEditor/type').CustomIcon>;
|
|
85
85
|
default: {};
|
|
86
86
|
};
|
|
87
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import('../MdEditor/type').EditorEmits, "onChange" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
87
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import('../MdEditor/type').EditorEmits, "onChange" | "onDrop" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
88
88
|
modelValue: {
|
|
89
89
|
type: import("vue").PropType<string>;
|
|
90
90
|
default: string;
|
|
@@ -172,6 +172,7 @@ declare const MdPreview: import("vue").DefineComponent<{
|
|
|
172
172
|
};
|
|
173
173
|
}>> & {
|
|
174
174
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
175
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
175
176
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
176
177
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
177
178
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -111,6 +111,7 @@ declare const _default: {
|
|
|
111
111
|
};
|
|
112
112
|
}>> & {
|
|
113
113
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
114
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
114
115
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
115
116
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
116
117
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -132,7 +133,7 @@ declare const _default: {
|
|
|
132
133
|
}>;
|
|
133
134
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
134
135
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
135
|
-
$emit: (event: "onChange" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", ...args: any[]) => void;
|
|
136
|
+
$emit: (event: "onChange" | "onDrop" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", ...args: any[]) => void;
|
|
136
137
|
$el: any;
|
|
137
138
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
138
139
|
modelValue: {
|
|
@@ -222,6 +223,7 @@ declare const _default: {
|
|
|
222
223
|
};
|
|
223
224
|
}>> & {
|
|
224
225
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
226
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
225
227
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
226
228
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
227
229
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -359,6 +361,7 @@ declare const _default: {
|
|
|
359
361
|
};
|
|
360
362
|
}>> & {
|
|
361
363
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
364
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
362
365
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
363
366
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
364
367
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -460,6 +463,7 @@ declare const _default: {
|
|
|
460
463
|
};
|
|
461
464
|
}>> & {
|
|
462
465
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
466
|
+
onOnDrop?: ((...args: any[]) => any) | undefined;
|
|
463
467
|
onOnFocus?: ((...args: any[]) => any) | undefined;
|
|
464
468
|
onOnBlur?: ((...args: any[]) => any) | undefined;
|
|
465
469
|
onOnInput?: ((...args: any[]) => any) | undefined;
|
|
@@ -469,7 +473,7 @@ declare const _default: {
|
|
|
469
473
|
onOnHtmlChanged?: ((...args: any[]) => any) | undefined;
|
|
470
474
|
onOnGetCatalog?: ((...args: any[]) => any) | undefined;
|
|
471
475
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
472
|
-
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("..").EditorEmits, "onChange" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", {
|
|
476
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("..").EditorEmits, "onChange" | "onDrop" | "onFocus" | "onBlur" | "onInput" | "onError" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "update:modelValue", {
|
|
473
477
|
editorId: string;
|
|
474
478
|
class: string;
|
|
475
479
|
style: string | import("vue").CSSProperties;
|