md-editor-v3 4.21.1 → 4.21.3
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/lib/cjs/MdEditor.cjs +14 -8
- package/lib/cjs/ModalToolbar.cjs +26 -11
- package/lib/cjs/NormalToolbar.cjs +18 -5
- package/lib/cjs/chunks/config.cjs +178 -186
- package/lib/cjs/chunks/dom.cjs +64 -52
- package/lib/cjs/chunks/index.cjs +66 -42
- package/lib/cjs/chunks/index2.cjs +22 -9
- package/lib/cjs/chunks/index3.cjs +8 -4
- package/lib/cjs/index.cjs +2 -1
- package/lib/es/MdEditor.mjs +14 -8
- package/lib/es/ModalToolbar.mjs +26 -11
- package/lib/es/NormalToolbar.mjs +18 -5
- package/lib/es/chunks/config.mjs +178 -186
- package/lib/es/chunks/dom.mjs +64 -52
- package/lib/es/chunks/index.mjs +66 -42
- package/lib/es/chunks/index2.mjs +22 -9
- package/lib/es/chunks/index3.mjs +8 -4
- package/lib/es/index.mjs +2 -1
- package/lib/types/DropdownToolbar/DropdownToolbar.d.ts +40 -0
- package/lib/types/DropdownToolbar/index.d.ts +94 -0
- package/lib/types/MdCatalog/MdCatalog.d.ts +12 -0
- package/lib/types/MdCatalog/index.d.ts +28 -0
- package/lib/types/MdEditor/Editor.d.ts +70 -0
- package/lib/types/MdEditor/config.d.ts +7 -7
- package/lib/types/MdEditor/index.d.ts +166 -0
- package/lib/types/MdEditor/layouts/Toolbar/index.d.ts +6 -0
- package/lib/types/MdEditor/layouts/Toolbar/props.d.ts +3 -0
- package/lib/types/MdEditor/props.d.ts +26 -0
- package/lib/types/MdPreview/MdPreview.d.ts +12 -0
- package/lib/types/MdPreview/index.d.ts +28 -0
- package/lib/types/ModalToolbar/ModalToolbar.d.ts +44 -0
- package/lib/types/ModalToolbar/index.d.ts +102 -0
- package/lib/types/NormalFooterToolbar/NormalFooterToolbar.d.ts +5 -1
- package/lib/types/NormalFooterToolbar/index.d.ts +13 -3
- package/lib/types/NormalToolbar/NormalToolbar.d.ts +35 -0
- package/lib/types/NormalToolbar/index.d.ts +79 -0
- package/lib/umd/index.js +42 -42
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
declare const Editor: import("vue").DefineComponent<{
|
|
2
2
|
onSave: {
|
|
3
3
|
type: import("vue").PropType<import("./type").SaveEvent>;
|
|
4
|
+
default: undefined;
|
|
4
5
|
};
|
|
5
6
|
onUploadImg: {
|
|
6
7
|
type: import("vue").PropType<import("./type").UploadImgEvent>;
|
|
8
|
+
default: undefined;
|
|
7
9
|
};
|
|
8
10
|
pageFullscreen: {
|
|
9
11
|
type: import("vue").PropType<boolean>;
|
|
@@ -35,6 +37,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
35
37
|
};
|
|
36
38
|
tableShape: {
|
|
37
39
|
type: import("vue").PropType<number[]>;
|
|
40
|
+
default: number[];
|
|
38
41
|
};
|
|
39
42
|
placeholder: {
|
|
40
43
|
type: import("vue").PropType<string>;
|
|
@@ -44,9 +47,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
44
47
|
type: import("vue").PropType<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
45
48
|
[key: string]: any;
|
|
46
49
|
}>>;
|
|
50
|
+
default: undefined;
|
|
47
51
|
};
|
|
48
52
|
onError: {
|
|
49
53
|
type: import("vue").PropType<import("./type").ErrorEvent>;
|
|
54
|
+
default: undefined;
|
|
50
55
|
};
|
|
51
56
|
footers: {
|
|
52
57
|
type: import("vue").PropType<import("./type").Footers[]>;
|
|
@@ -60,33 +65,43 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
60
65
|
type: import("vue").PropType<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
61
66
|
[key: string]: any;
|
|
62
67
|
}>>;
|
|
68
|
+
default: undefined;
|
|
63
69
|
};
|
|
64
70
|
noUploadImg: {
|
|
65
71
|
type: import("vue").PropType<boolean>;
|
|
72
|
+
default: boolean;
|
|
66
73
|
};
|
|
67
74
|
autoFocus: {
|
|
68
75
|
type: import("vue").PropType<boolean>;
|
|
76
|
+
default: boolean;
|
|
69
77
|
};
|
|
70
78
|
disabled: {
|
|
71
79
|
type: import("vue").PropType<boolean>;
|
|
80
|
+
default: boolean;
|
|
72
81
|
};
|
|
73
82
|
readOnly: {
|
|
74
83
|
type: import("vue").PropType<boolean>;
|
|
84
|
+
default: boolean;
|
|
75
85
|
};
|
|
76
86
|
maxLength: {
|
|
77
87
|
type: import("vue").PropType<number>;
|
|
88
|
+
default: undefined;
|
|
78
89
|
};
|
|
79
90
|
autoDetectCode: {
|
|
80
91
|
type: import("vue").PropType<boolean>;
|
|
92
|
+
default: boolean;
|
|
81
93
|
};
|
|
82
94
|
onBlur: {
|
|
83
95
|
type: import("vue").PropType<(event: FocusEvent) => void>;
|
|
96
|
+
default: undefined;
|
|
84
97
|
};
|
|
85
98
|
onFocus: {
|
|
86
99
|
type: import("vue").PropType<(event: FocusEvent) => void>;
|
|
100
|
+
default: undefined;
|
|
87
101
|
};
|
|
88
102
|
completions: {
|
|
89
103
|
type: import("vue").PropType<import("@codemirror/autocomplete").CompletionSource[]>;
|
|
104
|
+
default: undefined;
|
|
90
105
|
};
|
|
91
106
|
showToolbarName: {
|
|
92
107
|
type: import("vue").PropType<boolean>;
|
|
@@ -94,9 +109,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
94
109
|
};
|
|
95
110
|
onInput: {
|
|
96
111
|
type: import("vue").PropType<(event: Event) => void>;
|
|
112
|
+
default: undefined;
|
|
97
113
|
};
|
|
98
114
|
onDrop: {
|
|
99
115
|
type: import("vue").PropType<(event: DragEvent) => void>;
|
|
116
|
+
default: undefined;
|
|
100
117
|
};
|
|
101
118
|
inputBoxWitdh: {
|
|
102
119
|
type: import("vue").PropType<string>;
|
|
@@ -104,6 +121,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
104
121
|
};
|
|
105
122
|
onInputBoxWitdhChange: {
|
|
106
123
|
type: import("vue").PropType<(width: string) => void>;
|
|
124
|
+
default: undefined;
|
|
107
125
|
};
|
|
108
126
|
transformImgUrl: {
|
|
109
127
|
type: import("vue").PropType<(t: string) => string | Promise<string>>;
|
|
@@ -115,6 +133,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
115
133
|
};
|
|
116
134
|
onChange: {
|
|
117
135
|
type: import("vue").PropType<import("./type").ChangeEvent>;
|
|
136
|
+
default: undefined;
|
|
118
137
|
};
|
|
119
138
|
theme: {
|
|
120
139
|
type: import("vue").PropType<import("./type").Themes>;
|
|
@@ -130,9 +149,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
130
149
|
};
|
|
131
150
|
onHtmlChanged: {
|
|
132
151
|
type: import("vue").PropType<import("./type").HtmlChangedEvent>;
|
|
152
|
+
default: undefined;
|
|
133
153
|
};
|
|
134
154
|
onGetCatalog: {
|
|
135
155
|
type: import("vue").PropType<import("./type").GetCatalogEvent>;
|
|
156
|
+
default: undefined;
|
|
136
157
|
};
|
|
137
158
|
editorId: {
|
|
138
159
|
type: import("vue").PropType<string>;
|
|
@@ -172,6 +193,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
172
193
|
};
|
|
173
194
|
noIconfont: {
|
|
174
195
|
type: import("vue").PropType<boolean>;
|
|
196
|
+
default: undefined;
|
|
175
197
|
};
|
|
176
198
|
formatCopiedText: {
|
|
177
199
|
type: import("vue").PropType<(text: string) => string>;
|
|
@@ -212,9 +234,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
212
234
|
}, () => import("vue/jsx-runtime").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", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
213
235
|
onSave: {
|
|
214
236
|
type: import("vue").PropType<import("./type").SaveEvent>;
|
|
237
|
+
default: undefined;
|
|
215
238
|
};
|
|
216
239
|
onUploadImg: {
|
|
217
240
|
type: import("vue").PropType<import("./type").UploadImgEvent>;
|
|
241
|
+
default: undefined;
|
|
218
242
|
};
|
|
219
243
|
pageFullscreen: {
|
|
220
244
|
type: import("vue").PropType<boolean>;
|
|
@@ -246,6 +270,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
246
270
|
};
|
|
247
271
|
tableShape: {
|
|
248
272
|
type: import("vue").PropType<number[]>;
|
|
273
|
+
default: number[];
|
|
249
274
|
};
|
|
250
275
|
placeholder: {
|
|
251
276
|
type: import("vue").PropType<string>;
|
|
@@ -255,9 +280,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
255
280
|
type: import("vue").PropType<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
256
281
|
[key: string]: any;
|
|
257
282
|
}>>;
|
|
283
|
+
default: undefined;
|
|
258
284
|
};
|
|
259
285
|
onError: {
|
|
260
286
|
type: import("vue").PropType<import("./type").ErrorEvent>;
|
|
287
|
+
default: undefined;
|
|
261
288
|
};
|
|
262
289
|
footers: {
|
|
263
290
|
type: import("vue").PropType<import("./type").Footers[]>;
|
|
@@ -271,33 +298,43 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
271
298
|
type: import("vue").PropType<string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
272
299
|
[key: string]: any;
|
|
273
300
|
}>>;
|
|
301
|
+
default: undefined;
|
|
274
302
|
};
|
|
275
303
|
noUploadImg: {
|
|
276
304
|
type: import("vue").PropType<boolean>;
|
|
305
|
+
default: boolean;
|
|
277
306
|
};
|
|
278
307
|
autoFocus: {
|
|
279
308
|
type: import("vue").PropType<boolean>;
|
|
309
|
+
default: boolean;
|
|
280
310
|
};
|
|
281
311
|
disabled: {
|
|
282
312
|
type: import("vue").PropType<boolean>;
|
|
313
|
+
default: boolean;
|
|
283
314
|
};
|
|
284
315
|
readOnly: {
|
|
285
316
|
type: import("vue").PropType<boolean>;
|
|
317
|
+
default: boolean;
|
|
286
318
|
};
|
|
287
319
|
maxLength: {
|
|
288
320
|
type: import("vue").PropType<number>;
|
|
321
|
+
default: undefined;
|
|
289
322
|
};
|
|
290
323
|
autoDetectCode: {
|
|
291
324
|
type: import("vue").PropType<boolean>;
|
|
325
|
+
default: boolean;
|
|
292
326
|
};
|
|
293
327
|
onBlur: {
|
|
294
328
|
type: import("vue").PropType<(event: FocusEvent) => void>;
|
|
329
|
+
default: undefined;
|
|
295
330
|
};
|
|
296
331
|
onFocus: {
|
|
297
332
|
type: import("vue").PropType<(event: FocusEvent) => void>;
|
|
333
|
+
default: undefined;
|
|
298
334
|
};
|
|
299
335
|
completions: {
|
|
300
336
|
type: import("vue").PropType<import("@codemirror/autocomplete").CompletionSource[]>;
|
|
337
|
+
default: undefined;
|
|
301
338
|
};
|
|
302
339
|
showToolbarName: {
|
|
303
340
|
type: import("vue").PropType<boolean>;
|
|
@@ -305,9 +342,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
305
342
|
};
|
|
306
343
|
onInput: {
|
|
307
344
|
type: import("vue").PropType<(event: Event) => void>;
|
|
345
|
+
default: undefined;
|
|
308
346
|
};
|
|
309
347
|
onDrop: {
|
|
310
348
|
type: import("vue").PropType<(event: DragEvent) => void>;
|
|
349
|
+
default: undefined;
|
|
311
350
|
};
|
|
312
351
|
inputBoxWitdh: {
|
|
313
352
|
type: import("vue").PropType<string>;
|
|
@@ -315,6 +354,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
315
354
|
};
|
|
316
355
|
onInputBoxWitdhChange: {
|
|
317
356
|
type: import("vue").PropType<(width: string) => void>;
|
|
357
|
+
default: undefined;
|
|
318
358
|
};
|
|
319
359
|
transformImgUrl: {
|
|
320
360
|
type: import("vue").PropType<(t: string) => string | Promise<string>>;
|
|
@@ -326,6 +366,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
326
366
|
};
|
|
327
367
|
onChange: {
|
|
328
368
|
type: import("vue").PropType<import("./type").ChangeEvent>;
|
|
369
|
+
default: undefined;
|
|
329
370
|
};
|
|
330
371
|
theme: {
|
|
331
372
|
type: import("vue").PropType<import("./type").Themes>;
|
|
@@ -341,9 +382,11 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
341
382
|
};
|
|
342
383
|
onHtmlChanged: {
|
|
343
384
|
type: import("vue").PropType<import("./type").HtmlChangedEvent>;
|
|
385
|
+
default: undefined;
|
|
344
386
|
};
|
|
345
387
|
onGetCatalog: {
|
|
346
388
|
type: import("vue").PropType<import("./type").GetCatalogEvent>;
|
|
389
|
+
default: undefined;
|
|
347
390
|
};
|
|
348
391
|
editorId: {
|
|
349
392
|
type: import("vue").PropType<string>;
|
|
@@ -383,6 +426,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
383
426
|
};
|
|
384
427
|
noIconfont: {
|
|
385
428
|
type: import("vue").PropType<boolean>;
|
|
429
|
+
default: undefined;
|
|
386
430
|
};
|
|
387
431
|
formatCopiedText: {
|
|
388
432
|
type: import("vue").PropType<(text: string) => string>;
|
|
@@ -437,6 +481,17 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
437
481
|
preview: boolean;
|
|
438
482
|
pageFullscreen: boolean;
|
|
439
483
|
htmlPreview: boolean;
|
|
484
|
+
onChange: import("./type").ChangeEvent;
|
|
485
|
+
onSave: import("./type").SaveEvent;
|
|
486
|
+
onUploadImg: import("./type").UploadImgEvent;
|
|
487
|
+
onHtmlChanged: import("./type").HtmlChangedEvent;
|
|
488
|
+
onGetCatalog: import("./type").GetCatalogEvent;
|
|
489
|
+
onError: import("./type").ErrorEvent;
|
|
490
|
+
onBlur: (event: FocusEvent) => void;
|
|
491
|
+
onFocus: (event: FocusEvent) => void;
|
|
492
|
+
onInput: (event: Event) => void;
|
|
493
|
+
onDrop: (event: DragEvent) => void;
|
|
494
|
+
onInputBoxWitdhChange: (width: string) => void;
|
|
440
495
|
class: string;
|
|
441
496
|
style: string | import("vue").CSSProperties;
|
|
442
497
|
language: string;
|
|
@@ -444,9 +499,23 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
444
499
|
toolbarsExclude: import("./type").ToolbarNames[];
|
|
445
500
|
noPrettier: boolean;
|
|
446
501
|
tabWidth: number;
|
|
502
|
+
tableShape: number[];
|
|
447
503
|
placeholder: string;
|
|
504
|
+
defToolbars: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
505
|
+
[key: string]: any;
|
|
506
|
+
}>;
|
|
448
507
|
footers: import("./type").Footers[];
|
|
449
508
|
scrollAuto: boolean;
|
|
509
|
+
defFooters: string | import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
510
|
+
[key: string]: any;
|
|
511
|
+
}>;
|
|
512
|
+
noUploadImg: boolean;
|
|
513
|
+
autoFocus: boolean;
|
|
514
|
+
disabled: boolean;
|
|
515
|
+
readOnly: boolean;
|
|
516
|
+
maxLength: number;
|
|
517
|
+
autoDetectCode: boolean;
|
|
518
|
+
completions: import("@codemirror/autocomplete").CompletionSource[];
|
|
450
519
|
showToolbarName: boolean;
|
|
451
520
|
inputBoxWitdh: string;
|
|
452
521
|
transformImgUrl: (t: string) => string | Promise<string>;
|
|
@@ -460,6 +529,7 @@ declare const Editor: import("vue").DefineComponent<{
|
|
|
460
529
|
noMermaid: boolean;
|
|
461
530
|
noKatex: boolean;
|
|
462
531
|
codeTheme: string;
|
|
532
|
+
noIconfont: boolean;
|
|
463
533
|
formatCopiedText: (text: string) => string;
|
|
464
534
|
codeStyleReverse: boolean;
|
|
465
535
|
codeStyleReverseList: string[];
|
|
@@ -3,8 +3,8 @@ export declare const prefix = "md-editor";
|
|
|
3
3
|
export declare const defaultEditorId = "md-editor-v3";
|
|
4
4
|
export declare const iconfontSvgUrl = "https://at.alicdn.com/t/c/font_2605852_cmafimm6hot.js";
|
|
5
5
|
export declare const iconfontClassUrl = "https://at.alicdn.com/t/c/font_2605852_cmafimm6hot.css";
|
|
6
|
-
export declare const cdnBase = "https://
|
|
7
|
-
export declare const highlightUrl = "https://
|
|
6
|
+
export declare const cdnBase = "https://unpkg.com";
|
|
7
|
+
export declare const highlightUrl = "https://unpkg.com/@highlightjs/cdn-assets@11.10.0/highlight.min.js";
|
|
8
8
|
export declare const prettierUrl: {
|
|
9
9
|
main: string;
|
|
10
10
|
markdown: string;
|
|
@@ -13,17 +13,17 @@ export declare const cropperUrl: {
|
|
|
13
13
|
css: string;
|
|
14
14
|
js: string;
|
|
15
15
|
};
|
|
16
|
-
export declare const screenfullUrl = "https://
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const allFooter: Array<Footers>;
|
|
19
|
-
export declare const staticTextDefault: StaticTextDefault;
|
|
20
|
-
export declare const mermaidUrl = "https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.6.1/mermaid.esm.min.mjs";
|
|
16
|
+
export declare const screenfullUrl = "https://unpkg.com/screenfull@5.2.0/dist/screenfull.js";
|
|
17
|
+
export declare const mermaidUrl = "https://unpkg.com/mermaid@11.3.0/dist/mermaid.min.js";
|
|
21
18
|
export declare const katexUrl: {
|
|
22
19
|
js: string;
|
|
23
20
|
css: string;
|
|
24
21
|
};
|
|
25
22
|
export declare const codeCss: CodeCss;
|
|
26
23
|
export declare const editorExtensionsAttrs: ConfigOption['editorExtensionsAttrs'];
|
|
24
|
+
export declare const allToolbar: string[];
|
|
25
|
+
export declare const allFooter: Array<Footers>;
|
|
26
|
+
export declare const staticTextDefault: StaticTextDefault;
|
|
27
27
|
export declare const configOption: ConfigOption;
|
|
28
28
|
export declare const config: Config;
|
|
29
29
|
/**
|