md-editor-v3 6.4.2 → 6.5.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 -1
- package/lib/cjs/chunks/config.cjs +1 -1
- package/lib/cjs/chunks/index3.cjs +27 -27
- package/lib/es/chunks/config.mjs +2 -1
- package/lib/es/chunks/index3.mjs +380 -377
- package/lib/types/index.d.ts +76 -66
- package/package.json +1 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -1027,6 +1027,16 @@ interface GlobalConfig {
|
|
|
1027
1027
|
echarts?: {
|
|
1028
1028
|
instance?: any;
|
|
1029
1029
|
js?: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* 解析echarts代码块内容。
|
|
1032
|
+
*
|
|
1033
|
+
* 默认实现会使用new Function以兼容官方配置中的函数写法;当内容来源不可信时,
|
|
1034
|
+
* 业务侧应通过该方法替换为更严格的解析策略。
|
|
1035
|
+
*/
|
|
1036
|
+
parseOption?: (code: string, options: {
|
|
1037
|
+
editorId: string;
|
|
1038
|
+
element: HTMLElement;
|
|
1039
|
+
}) => any;
|
|
1030
1040
|
};
|
|
1031
1041
|
};
|
|
1032
1042
|
/**
|
|
@@ -1840,10 +1850,18 @@ declare const Editor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1840
1850
|
onOninputBoxWidthChange?: ((...args: any[]) => any) | undefined;
|
|
1841
1851
|
onOnRemount?: ((...args: any[]) => any) | undefined;
|
|
1842
1852
|
}>, {
|
|
1853
|
+
language: string;
|
|
1854
|
+
theme: Themes;
|
|
1855
|
+
previewTheme: string;
|
|
1856
|
+
codeTheme: string;
|
|
1857
|
+
disabled: boolean;
|
|
1858
|
+
showToolbarName: boolean;
|
|
1859
|
+
onChange: ChangeEvent;
|
|
1860
|
+
class: string;
|
|
1861
|
+
style: string | vue.CSSProperties;
|
|
1843
1862
|
preview: boolean;
|
|
1844
1863
|
pageFullscreen: boolean;
|
|
1845
1864
|
htmlPreview: boolean;
|
|
1846
|
-
onChange: ChangeEvent;
|
|
1847
1865
|
onSave: SaveEvent;
|
|
1848
1866
|
onUploadImg: UploadImgEvent;
|
|
1849
1867
|
onHtmlChanged: HtmlChangedEvent;
|
|
@@ -1872,30 +1890,22 @@ declare const Editor: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1872
1890
|
}>;
|
|
1873
1891
|
noUploadImg: boolean;
|
|
1874
1892
|
autoFocus: boolean;
|
|
1875
|
-
disabled: boolean;
|
|
1876
1893
|
readOnly: boolean;
|
|
1877
1894
|
maxLength: number;
|
|
1878
1895
|
autoDetectCode: boolean;
|
|
1879
1896
|
completions: _codemirror_autocomplete.CompletionSource[];
|
|
1880
|
-
showToolbarName: boolean;
|
|
1881
1897
|
inputBoxWidth: string;
|
|
1882
1898
|
transformImgUrl: (t: string) => string | Promise<string>;
|
|
1883
|
-
catalogLayout: "
|
|
1899
|
+
catalogLayout: "flat" | "fixed";
|
|
1884
1900
|
catalogMaxDepth: number;
|
|
1885
1901
|
modelValue: string;
|
|
1886
|
-
theme: Themes;
|
|
1887
|
-
class: string;
|
|
1888
|
-
language: string;
|
|
1889
1902
|
editorId: string;
|
|
1890
1903
|
id: string;
|
|
1891
1904
|
showCodeRowNumber: boolean;
|
|
1892
|
-
previewTheme: string;
|
|
1893
|
-
style: string | vue.CSSProperties;
|
|
1894
1905
|
mdHeadingId: MdHeadingId;
|
|
1895
1906
|
sanitize: (html: string) => string;
|
|
1896
1907
|
noMermaid: boolean;
|
|
1897
1908
|
noKatex: boolean;
|
|
1898
|
-
codeTheme: string;
|
|
1899
1909
|
formatCopiedText: (text: string) => string;
|
|
1900
1910
|
codeStyleReverse: boolean;
|
|
1901
1911
|
codeStyleReverseList: string[];
|
|
@@ -2014,18 +2024,18 @@ declare const _default$b: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2014
2024
|
}>> & Readonly<{
|
|
2015
2025
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
2016
2026
|
}>, {
|
|
2017
|
-
title: string;
|
|
2018
|
-
disabled: boolean;
|
|
2019
|
-
showToolbarName: boolean;
|
|
2020
|
-
theme: Themes;
|
|
2021
|
-
language: string;
|
|
2022
|
-
previewTheme: string;
|
|
2023
|
-
codeTheme: string;
|
|
2024
2027
|
onClick: (e: MouseEvent) => void;
|
|
2028
|
+
title: string;
|
|
2025
2029
|
trigger: string | VNode<vue.RendererNode, vue.RendererElement, {
|
|
2026
2030
|
[key: string]: any;
|
|
2027
2031
|
}>;
|
|
2028
2032
|
insert: () => void;
|
|
2033
|
+
language: string;
|
|
2034
|
+
theme: Themes;
|
|
2035
|
+
previewTheme: string;
|
|
2036
|
+
codeTheme: string;
|
|
2037
|
+
disabled: boolean;
|
|
2038
|
+
showToolbarName: boolean;
|
|
2029
2039
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2030
2040
|
|
|
2031
2041
|
declare const _default$a: typeof _default$b & {
|
|
@@ -2150,17 +2160,17 @@ declare const _default$9: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2150
2160
|
onOnChange?: ((...args: any[]) => any) | undefined;
|
|
2151
2161
|
}>, {
|
|
2152
2162
|
title: string;
|
|
2153
|
-
onChange: (visible: boolean) => void;
|
|
2154
|
-
disabled: boolean;
|
|
2155
|
-
showToolbarName: boolean;
|
|
2156
|
-
theme: Themes;
|
|
2157
|
-
language: string;
|
|
2158
|
-
previewTheme: string;
|
|
2159
|
-
codeTheme: string;
|
|
2160
2163
|
trigger: string | VNode<vue.RendererNode, vue.RendererElement, {
|
|
2161
2164
|
[key: string]: any;
|
|
2162
2165
|
}>;
|
|
2163
2166
|
insert: () => void;
|
|
2167
|
+
language: string;
|
|
2168
|
+
theme: Themes;
|
|
2169
|
+
previewTheme: string;
|
|
2170
|
+
codeTheme: string;
|
|
2171
|
+
disabled: boolean;
|
|
2172
|
+
showToolbarName: boolean;
|
|
2173
|
+
onChange: (visible: boolean) => void;
|
|
2164
2174
|
visible: boolean;
|
|
2165
2175
|
overlay: string | VNode<vue.RendererNode, vue.RendererElement, {
|
|
2166
2176
|
[key: string]: any;
|
|
@@ -2358,20 +2368,18 @@ declare const _default$7: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2358
2368
|
onOnClose?: ((...args: any[]) => any) | undefined;
|
|
2359
2369
|
onOnAdjust?: ((...args: any[]) => any) | undefined;
|
|
2360
2370
|
}>, {
|
|
2361
|
-
title: string;
|
|
2362
|
-
disabled: boolean;
|
|
2363
|
-
showToolbarName: boolean;
|
|
2364
|
-
theme: Themes;
|
|
2365
|
-
class: string;
|
|
2366
|
-
language: string;
|
|
2367
|
-
previewTheme: string;
|
|
2368
|
-
style: string | CSSProperties;
|
|
2369
|
-
codeTheme: string;
|
|
2370
2371
|
onClick: () => void;
|
|
2372
|
+
title: string;
|
|
2371
2373
|
trigger: string | VNode<vue.RendererNode, vue.RendererElement, {
|
|
2372
2374
|
[key: string]: any;
|
|
2373
2375
|
}>;
|
|
2374
2376
|
insert: () => void;
|
|
2377
|
+
language: string;
|
|
2378
|
+
theme: Themes;
|
|
2379
|
+
previewTheme: string;
|
|
2380
|
+
codeTheme: string;
|
|
2381
|
+
disabled: boolean;
|
|
2382
|
+
showToolbarName: boolean;
|
|
2375
2383
|
visible: boolean;
|
|
2376
2384
|
onClose: () => void;
|
|
2377
2385
|
onAdjust: (val: boolean) => void;
|
|
@@ -2382,6 +2390,8 @@ declare const _default$7: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2382
2390
|
height: string;
|
|
2383
2391
|
showAdjust: boolean;
|
|
2384
2392
|
isFullscreen: boolean;
|
|
2393
|
+
class: string;
|
|
2394
|
+
style: string | CSSProperties;
|
|
2385
2395
|
showMask: boolean;
|
|
2386
2396
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2387
2397
|
|
|
@@ -2485,14 +2495,14 @@ declare const _default$5: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2485
2495
|
}> | VNode<vue.RendererNode, vue.RendererElement, {
|
|
2486
2496
|
[key: string]: any;
|
|
2487
2497
|
}>[];
|
|
2488
|
-
class: string;
|
|
2489
|
-
style: string | CSSProperties;
|
|
2490
2498
|
visible: boolean;
|
|
2491
2499
|
onAdjust: (val: boolean) => void;
|
|
2492
2500
|
width: string;
|
|
2493
2501
|
height: string;
|
|
2494
2502
|
showAdjust: boolean;
|
|
2495
2503
|
isFullscreen: boolean;
|
|
2504
|
+
class: string;
|
|
2505
|
+
style: string | CSSProperties;
|
|
2496
2506
|
showMask: boolean;
|
|
2497
2507
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2498
2508
|
|
|
@@ -2545,10 +2555,10 @@ declare const _default$3: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
2545
2555
|
}>> & Readonly<{
|
|
2546
2556
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
2547
2557
|
}>, {
|
|
2548
|
-
disabled: boolean;
|
|
2549
|
-
theme: Themes;
|
|
2550
|
-
language: string;
|
|
2551
2558
|
onClick: (e: MouseEvent) => void;
|
|
2559
|
+
language: string;
|
|
2560
|
+
theme: Themes;
|
|
2561
|
+
disabled: boolean;
|
|
2552
2562
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
2553
2563
|
|
|
2554
2564
|
declare const _default$2: typeof _default$3 & {
|
|
@@ -2556,49 +2566,49 @@ declare const _default$2: typeof _default$3 & {
|
|
|
2556
2566
|
};
|
|
2557
2567
|
|
|
2558
2568
|
declare const MdPreview: vue.DefineComponent<{
|
|
2559
|
-
readonly modelValue: string;
|
|
2560
|
-
readonly theme: Themes;
|
|
2561
|
-
readonly class: string;
|
|
2562
2569
|
readonly language: string;
|
|
2563
|
-
readonly
|
|
2570
|
+
readonly theme: Themes;
|
|
2564
2571
|
readonly previewTheme: string;
|
|
2572
|
+
readonly codeTheme: string;
|
|
2573
|
+
readonly class: string;
|
|
2565
2574
|
readonly style: string | vue.CSSProperties;
|
|
2575
|
+
readonly modelValue: string;
|
|
2576
|
+
readonly showCodeRowNumber: boolean;
|
|
2566
2577
|
readonly mdHeadingId: MdHeadingId;
|
|
2567
2578
|
readonly sanitize: (html: string) => string;
|
|
2568
2579
|
readonly noMermaid: boolean;
|
|
2569
2580
|
readonly noKatex: boolean;
|
|
2570
|
-
readonly codeTheme: string;
|
|
2571
2581
|
readonly formatCopiedText: (text: string) => string;
|
|
2572
2582
|
readonly codeStyleReverse: boolean;
|
|
2573
2583
|
readonly codeStyleReverseList: string[];
|
|
2574
2584
|
readonly noHighlight: boolean;
|
|
2575
2585
|
readonly noImgZoomIn: boolean;
|
|
2576
2586
|
readonly customIcon: {
|
|
2577
|
-
|
|
2587
|
+
title?: {
|
|
2578
2588
|
component: vue.Component | vue.VNode | string;
|
|
2579
2589
|
props?: {
|
|
2580
2590
|
[key: string | number | symbol]: any;
|
|
2581
2591
|
};
|
|
2582
2592
|
} | undefined;
|
|
2583
|
-
|
|
2593
|
+
bold?: {
|
|
2584
2594
|
component: vue.Component | vue.VNode | string;
|
|
2585
2595
|
props?: {
|
|
2586
2596
|
[key: string | number | symbol]: any;
|
|
2587
2597
|
};
|
|
2588
2598
|
} | undefined;
|
|
2589
|
-
|
|
2599
|
+
underline?: {
|
|
2590
2600
|
component: vue.Component | vue.VNode | string;
|
|
2591
2601
|
props?: {
|
|
2592
2602
|
[key: string | number | symbol]: any;
|
|
2593
2603
|
};
|
|
2594
2604
|
} | undefined;
|
|
2595
|
-
|
|
2605
|
+
italic?: {
|
|
2596
2606
|
component: vue.Component | vue.VNode | string;
|
|
2597
2607
|
props?: {
|
|
2598
2608
|
[key: string | number | symbol]: any;
|
|
2599
2609
|
};
|
|
2600
2610
|
} | undefined;
|
|
2601
|
-
|
|
2611
|
+
"strike-through"?: {
|
|
2602
2612
|
component: vue.Component | vue.VNode | string;
|
|
2603
2613
|
props?: {
|
|
2604
2614
|
[key: string | number | symbol]: any;
|
|
@@ -2791,49 +2801,49 @@ declare const MdPreview: vue.DefineComponent<{
|
|
|
2791
2801
|
readonly id: string | undefined;
|
|
2792
2802
|
readonly previewComponent: vue.Component | undefined;
|
|
2793
2803
|
}, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, EditorEmits, "onChange" | "onSave" | "onUploadImg" | "onHtmlChanged" | "onGetCatalog" | "onError" | "update:modelValue" | "onBlur" | "onFocus" | "onInput" | "onDrop" | "oninputBoxWidthChange" | "onRemount", vue.PublicProps, Readonly<{
|
|
2794
|
-
readonly modelValue: string;
|
|
2795
|
-
readonly theme: Themes;
|
|
2796
|
-
readonly class: string;
|
|
2797
2804
|
readonly language: string;
|
|
2798
|
-
readonly
|
|
2805
|
+
readonly theme: Themes;
|
|
2799
2806
|
readonly previewTheme: string;
|
|
2807
|
+
readonly codeTheme: string;
|
|
2808
|
+
readonly class: string;
|
|
2800
2809
|
readonly style: string | vue.CSSProperties;
|
|
2810
|
+
readonly modelValue: string;
|
|
2811
|
+
readonly showCodeRowNumber: boolean;
|
|
2801
2812
|
readonly mdHeadingId: MdHeadingId;
|
|
2802
2813
|
readonly sanitize: (html: string) => string;
|
|
2803
2814
|
readonly noMermaid: boolean;
|
|
2804
2815
|
readonly noKatex: boolean;
|
|
2805
|
-
readonly codeTheme: string;
|
|
2806
2816
|
readonly formatCopiedText: (text: string) => string;
|
|
2807
2817
|
readonly codeStyleReverse: boolean;
|
|
2808
2818
|
readonly codeStyleReverseList: string[];
|
|
2809
2819
|
readonly noHighlight: boolean;
|
|
2810
2820
|
readonly noImgZoomIn: boolean;
|
|
2811
2821
|
readonly customIcon: {
|
|
2812
|
-
|
|
2822
|
+
title?: {
|
|
2813
2823
|
component: vue.Component | vue.VNode | string;
|
|
2814
2824
|
props?: {
|
|
2815
2825
|
[key: string | number | symbol]: any;
|
|
2816
2826
|
};
|
|
2817
2827
|
} | undefined;
|
|
2818
|
-
|
|
2828
|
+
bold?: {
|
|
2819
2829
|
component: vue.Component | vue.VNode | string;
|
|
2820
2830
|
props?: {
|
|
2821
2831
|
[key: string | number | symbol]: any;
|
|
2822
2832
|
};
|
|
2823
2833
|
} | undefined;
|
|
2824
|
-
|
|
2834
|
+
underline?: {
|
|
2825
2835
|
component: vue.Component | vue.VNode | string;
|
|
2826
2836
|
props?: {
|
|
2827
2837
|
[key: string | number | symbol]: any;
|
|
2828
2838
|
};
|
|
2829
2839
|
} | undefined;
|
|
2830
|
-
|
|
2840
|
+
italic?: {
|
|
2831
2841
|
component: vue.Component | vue.VNode | string;
|
|
2832
2842
|
props?: {
|
|
2833
2843
|
[key: string | number | symbol]: any;
|
|
2834
2844
|
};
|
|
2835
2845
|
} | undefined;
|
|
2836
|
-
|
|
2846
|
+
"strike-through"?: {
|
|
2837
2847
|
component: vue.Component | vue.VNode | string;
|
|
2838
2848
|
props?: {
|
|
2839
2849
|
[key: string | number | symbol]: any;
|
|
@@ -3040,24 +3050,24 @@ declare const MdPreview: vue.DefineComponent<{
|
|
|
3040
3050
|
onOninputBoxWidthChange?: ((...args: any[]) => any) | undefined;
|
|
3041
3051
|
onOnRemount?: ((...args: any[]) => any) | undefined;
|
|
3042
3052
|
}>, {
|
|
3053
|
+
language: string;
|
|
3054
|
+
theme: Themes;
|
|
3055
|
+
previewTheme: string;
|
|
3056
|
+
codeTheme: string;
|
|
3043
3057
|
onChange: ChangeEvent;
|
|
3058
|
+
class: string;
|
|
3059
|
+
style: string | vue.CSSProperties;
|
|
3044
3060
|
onHtmlChanged: HtmlChangedEvent;
|
|
3045
3061
|
onGetCatalog: GetCatalogEvent;
|
|
3046
3062
|
onRemount: () => void;
|
|
3047
3063
|
modelValue: string;
|
|
3048
|
-
theme: Themes;
|
|
3049
|
-
class: string;
|
|
3050
|
-
language: string;
|
|
3051
3064
|
editorId: string;
|
|
3052
3065
|
id: string;
|
|
3053
3066
|
showCodeRowNumber: boolean;
|
|
3054
|
-
previewTheme: string;
|
|
3055
|
-
style: string | vue.CSSProperties;
|
|
3056
3067
|
mdHeadingId: MdHeadingId;
|
|
3057
3068
|
sanitize: (html: string) => string;
|
|
3058
3069
|
noMermaid: boolean;
|
|
3059
3070
|
noKatex: boolean;
|
|
3060
|
-
codeTheme: string;
|
|
3061
3071
|
formatCopiedText: (text: string) => string;
|
|
3062
3072
|
codeStyleReverse: boolean;
|
|
3063
3073
|
codeStyleReverseList: string[];
|
|
@@ -3245,12 +3255,12 @@ declare const MdCatalog: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
3245
3255
|
onOnClick?: ((...args: any[]) => any) | undefined;
|
|
3246
3256
|
onOnActive?: ((...args: any[]) => any) | undefined;
|
|
3247
3257
|
}>, {
|
|
3248
|
-
|
|
3258
|
+
onClick: (e: MouseEvent, t: TocItem) => void;
|
|
3249
3259
|
theme: Themes;
|
|
3250
3260
|
class: string;
|
|
3261
|
+
catalogMaxDepth: number;
|
|
3251
3262
|
editorId: string;
|
|
3252
3263
|
mdHeadingId: MdHeadingId;
|
|
3253
|
-
onClick: (e: MouseEvent, t: TocItem) => void;
|
|
3254
3264
|
onActive: (heading: HeadList | undefined, activeElement: HTMLDivElement) => void;
|
|
3255
3265
|
scrollElement: string | HTMLElement;
|
|
3256
3266
|
offsetTop: number;
|