md-editor-v3 4.21.2 → 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/index.cjs +44 -22
- 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/index.mjs +44 -22
- 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/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
package/lib/cjs/MdEditor.cjs
CHANGED
|
@@ -83,6 +83,9 @@ const toolbarProps = {
|
|
|
83
83
|
},
|
|
84
84
|
catalogVisible: {
|
|
85
85
|
type: Boolean
|
|
86
|
+
},
|
|
87
|
+
codeTheme: {
|
|
88
|
+
type: String
|
|
86
89
|
}
|
|
87
90
|
};
|
|
88
91
|
const useSreenfull = (props2) => {
|
|
@@ -579,7 +582,7 @@ const ToolBar = /* @__PURE__ */ vue.defineComponent({
|
|
|
579
582
|
uploadRef.value.addEventListener("change", uploadHandler);
|
|
580
583
|
});
|
|
581
584
|
const barRender = (barItem) => {
|
|
582
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa;
|
|
585
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa;
|
|
583
586
|
if (config.allToolbar.includes(barItem)) {
|
|
584
587
|
switch (barItem) {
|
|
585
588
|
case "-": {
|
|
@@ -1191,9 +1194,10 @@ const ToolBar = /* @__PURE__ */ vue.defineComponent({
|
|
|
1191
1194
|
const defItem = props2.defToolbars[barItem];
|
|
1192
1195
|
if (defItem) {
|
|
1193
1196
|
const defItemCloned = vue.cloneVNode(defItem, {
|
|
1194
|
-
theme: theme.value,
|
|
1195
|
-
previewTheme: previewTheme.value,
|
|
1196
|
-
language: language2.value,
|
|
1197
|
+
theme: ((_pa = defItem.props) == null ? void 0 : _pa.theme) || theme.value,
|
|
1198
|
+
previewTheme: ((_qa = defItem.props) == null ? void 0 : _qa.theme) || previewTheme.value,
|
|
1199
|
+
language: ((_ra = defItem.props) == null ? void 0 : _ra.theme) || language2.value,
|
|
1200
|
+
codeTheme: ((_sa = defItem.props) == null ? void 0 : _sa.codeTheme) || props2.codeTheme,
|
|
1197
1201
|
insert(generate) {
|
|
1198
1202
|
eventName.bus.emit(editorId, eventName.REPLACE, "universal", {
|
|
1199
1203
|
generate
|
|
@@ -1207,9 +1211,10 @@ const ToolBar = /* @__PURE__ */ vue.defineComponent({
|
|
|
1207
1211
|
const defItem = props2.defToolbars.children[barItem];
|
|
1208
1212
|
if (defItem) {
|
|
1209
1213
|
const defItemCloned = vue.cloneVNode(defItem, {
|
|
1210
|
-
theme: theme.value,
|
|
1211
|
-
previewTheme: previewTheme.value,
|
|
1212
|
-
language: language2.value,
|
|
1214
|
+
theme: ((_ta = defItem.props) == null ? void 0 : _ta.theme) || theme.value,
|
|
1215
|
+
previewTheme: ((_ua = defItem.props) == null ? void 0 : _ua.theme) || previewTheme.value,
|
|
1216
|
+
language: ((_va = defItem.props) == null ? void 0 : _va.theme) || language2.value,
|
|
1217
|
+
codeTheme: ((_wa = defItem.props) == null ? void 0 : _wa.codeTheme) || props2.codeTheme,
|
|
1213
1218
|
insert(generate) {
|
|
1214
1219
|
eventName.bus.emit(editorId, eventName.REPLACE, "universal", {
|
|
1215
1220
|
generate
|
|
@@ -3024,7 +3029,8 @@ const Editor = /* @__PURE__ */ vue.defineComponent({
|
|
|
3024
3029
|
"defToolbars": defToolbars,
|
|
3025
3030
|
"noUploadImg": noUploadImg,
|
|
3026
3031
|
"showToolbarName": props2.showToolbarName,
|
|
3027
|
-
"catalogVisible": catalogVisible.value
|
|
3032
|
+
"catalogVisible": catalogVisible.value,
|
|
3033
|
+
"codeTheme": props2.codeTheme
|
|
3028
3034
|
}, null), vue.createVNode(Content, {
|
|
3029
3035
|
"ref": codeRef,
|
|
3030
3036
|
"modelValue": props2.modelValue,
|
package/lib/cjs/ModalToolbar.cjs
CHANGED
|
@@ -16,7 +16,8 @@ const props = {
|
|
|
16
16
|
default: ""
|
|
17
17
|
},
|
|
18
18
|
visible: {
|
|
19
|
-
type: Boolean
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: void 0
|
|
20
21
|
},
|
|
21
22
|
width: {
|
|
22
23
|
type: String,
|
|
@@ -28,13 +29,16 @@ const props = {
|
|
|
28
29
|
},
|
|
29
30
|
// 展示在工具栏的内容,通常是个图标
|
|
30
31
|
trigger: {
|
|
31
|
-
type: [String, Object]
|
|
32
|
+
type: [String, Object],
|
|
33
|
+
default: void 0
|
|
32
34
|
},
|
|
33
35
|
onClick: {
|
|
34
|
-
type: Function
|
|
36
|
+
type: Function,
|
|
37
|
+
default: void 0
|
|
35
38
|
},
|
|
36
39
|
onClose: {
|
|
37
|
-
type: Function
|
|
40
|
+
type: Function,
|
|
41
|
+
default: void 0
|
|
38
42
|
},
|
|
39
43
|
/**
|
|
40
44
|
* 显示全屏按钮
|
|
@@ -48,13 +52,16 @@ const props = {
|
|
|
48
52
|
default: false
|
|
49
53
|
},
|
|
50
54
|
onAdjust: {
|
|
51
|
-
type: Function
|
|
55
|
+
type: Function,
|
|
56
|
+
default: void 0
|
|
52
57
|
},
|
|
53
58
|
class: {
|
|
54
|
-
type: String
|
|
59
|
+
type: String,
|
|
60
|
+
default: void 0
|
|
55
61
|
},
|
|
56
62
|
style: {
|
|
57
|
-
type: [Object, String]
|
|
63
|
+
type: [Object, String],
|
|
64
|
+
default: void 0
|
|
58
65
|
},
|
|
59
66
|
showMask: {
|
|
60
67
|
type: Boolean,
|
|
@@ -64,16 +71,24 @@ const props = {
|
|
|
64
71
|
* ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
|
|
65
72
|
*/
|
|
66
73
|
insert: {
|
|
67
|
-
type: Function
|
|
74
|
+
type: Function,
|
|
75
|
+
default: void 0
|
|
68
76
|
},
|
|
69
77
|
language: {
|
|
70
|
-
type: String
|
|
78
|
+
type: String,
|
|
79
|
+
default: void 0
|
|
71
80
|
},
|
|
72
81
|
theme: {
|
|
73
|
-
type: String
|
|
82
|
+
type: String,
|
|
83
|
+
default: void 0
|
|
74
84
|
},
|
|
75
85
|
previewTheme: {
|
|
76
|
-
type: String
|
|
86
|
+
type: String,
|
|
87
|
+
default: void 0
|
|
88
|
+
},
|
|
89
|
+
codeTheme: {
|
|
90
|
+
type: String,
|
|
91
|
+
default: void 0
|
|
77
92
|
}
|
|
78
93
|
/**
|
|
79
94
|
* ==结束
|
|
@@ -9,22 +9,35 @@ const props = {
|
|
|
9
9
|
},
|
|
10
10
|
// 展示在工具栏的内容,通常是个图标
|
|
11
11
|
trigger: {
|
|
12
|
-
type: [String, Object]
|
|
12
|
+
type: [String, Object],
|
|
13
|
+
default: void 0
|
|
13
14
|
},
|
|
14
15
|
onClick: {
|
|
15
|
-
type: Function
|
|
16
|
+
type: Function,
|
|
17
|
+
default: void 0
|
|
16
18
|
},
|
|
17
19
|
/**
|
|
18
20
|
* ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
|
|
19
21
|
*/
|
|
20
22
|
insert: {
|
|
21
|
-
type: Function
|
|
23
|
+
type: Function,
|
|
24
|
+
default: void 0
|
|
22
25
|
},
|
|
23
26
|
language: {
|
|
24
|
-
type: String
|
|
27
|
+
type: String,
|
|
28
|
+
default: void 0
|
|
25
29
|
},
|
|
26
30
|
theme: {
|
|
27
|
-
type: String
|
|
31
|
+
type: String,
|
|
32
|
+
default: void 0
|
|
33
|
+
},
|
|
34
|
+
previewTheme: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: void 0
|
|
37
|
+
},
|
|
38
|
+
codeTheme: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: void 0
|
|
28
41
|
}
|
|
29
42
|
/**
|
|
30
43
|
* ==结束
|
package/lib/cjs/chunks/index.cjs
CHANGED
|
@@ -3003,7 +3003,8 @@ const mdPreviewProps = {
|
|
|
3003
3003
|
* input回调事件
|
|
3004
3004
|
*/
|
|
3005
3005
|
onChange: {
|
|
3006
|
-
type: Function
|
|
3006
|
+
type: Function,
|
|
3007
|
+
default: void 0
|
|
3007
3008
|
},
|
|
3008
3009
|
/**
|
|
3009
3010
|
* 主题,支持light和dark
|
|
@@ -3036,13 +3037,15 @@ const mdPreviewProps = {
|
|
|
3036
3037
|
* html变化事件
|
|
3037
3038
|
*/
|
|
3038
3039
|
onHtmlChanged: {
|
|
3039
|
-
type: Function
|
|
3040
|
+
type: Function,
|
|
3041
|
+
default: void 0
|
|
3040
3042
|
},
|
|
3041
3043
|
/**
|
|
3042
3044
|
* 获取目录结构
|
|
3043
3045
|
*/
|
|
3044
3046
|
onGetCatalog: {
|
|
3045
|
-
type: Function
|
|
3047
|
+
type: Function,
|
|
3048
|
+
default: void 0
|
|
3046
3049
|
},
|
|
3047
3050
|
/**
|
|
3048
3051
|
* 编辑器唯一标识
|
|
@@ -3131,7 +3134,8 @@ const mdPreviewProps = {
|
|
|
3131
3134
|
* @default false
|
|
3132
3135
|
*/
|
|
3133
3136
|
noIconfont: {
|
|
3134
|
-
type: Boolean
|
|
3137
|
+
type: Boolean,
|
|
3138
|
+
default: void 0
|
|
3135
3139
|
},
|
|
3136
3140
|
/**
|
|
3137
3141
|
* 复制代码格式化方法
|
|
@@ -3209,13 +3213,15 @@ const editorProps = {
|
|
|
3209
3213
|
* input回调事件
|
|
3210
3214
|
*/
|
|
3211
3215
|
onSave: {
|
|
3212
|
-
type: Function
|
|
3216
|
+
type: Function,
|
|
3217
|
+
default: void 0
|
|
3213
3218
|
},
|
|
3214
3219
|
/**
|
|
3215
3220
|
* 上传图片事件
|
|
3216
3221
|
*/
|
|
3217
3222
|
onUploadImg: {
|
|
3218
|
-
type: Function
|
|
3223
|
+
type: Function,
|
|
3224
|
+
default: void 0
|
|
3219
3225
|
},
|
|
3220
3226
|
/**
|
|
3221
3227
|
* 是否页面内全屏
|
|
@@ -3299,7 +3305,8 @@ const editorProps = {
|
|
|
3299
3305
|
* @default [6, 4]
|
|
3300
3306
|
*/
|
|
3301
3307
|
tableShape: {
|
|
3302
|
-
type: Array
|
|
3308
|
+
type: Array,
|
|
3309
|
+
default: [6, 4]
|
|
3303
3310
|
},
|
|
3304
3311
|
/**
|
|
3305
3312
|
* 空提示
|
|
@@ -3314,13 +3321,15 @@ const editorProps = {
|
|
|
3314
3321
|
* 自定义的工具栏列表
|
|
3315
3322
|
*/
|
|
3316
3323
|
defToolbars: {
|
|
3317
|
-
type: [String, Object]
|
|
3324
|
+
type: [String, Object],
|
|
3325
|
+
default: void 0
|
|
3318
3326
|
},
|
|
3319
3327
|
/**
|
|
3320
3328
|
* 内部错误捕获
|
|
3321
3329
|
*/
|
|
3322
3330
|
onError: {
|
|
3323
|
-
type: Function
|
|
3331
|
+
type: Function,
|
|
3332
|
+
default: void 0
|
|
3324
3333
|
},
|
|
3325
3334
|
/**
|
|
3326
3335
|
* 页脚列表显示顺序
|
|
@@ -3342,7 +3351,8 @@ const editorProps = {
|
|
|
3342
3351
|
* 自定义的也叫工具组件列表
|
|
3343
3352
|
*/
|
|
3344
3353
|
defFooters: {
|
|
3345
|
-
type: [String, Object]
|
|
3354
|
+
type: [String, Object],
|
|
3355
|
+
default: void 0
|
|
3346
3356
|
},
|
|
3347
3357
|
/**
|
|
3348
3358
|
* 是否禁用上传图片
|
|
@@ -3350,7 +3360,8 @@ const editorProps = {
|
|
|
3350
3360
|
* @default false
|
|
3351
3361
|
*/
|
|
3352
3362
|
noUploadImg: {
|
|
3353
|
-
type: Boolean
|
|
3363
|
+
type: Boolean,
|
|
3364
|
+
default: false
|
|
3354
3365
|
},
|
|
3355
3366
|
/**
|
|
3356
3367
|
* 文本区域自动获得焦点
|
|
@@ -3358,7 +3369,8 @@ const editorProps = {
|
|
|
3358
3369
|
* @default false
|
|
3359
3370
|
*/
|
|
3360
3371
|
autoFocus: {
|
|
3361
|
-
type: Boolean
|
|
3372
|
+
type: Boolean,
|
|
3373
|
+
default: false
|
|
3362
3374
|
},
|
|
3363
3375
|
/**
|
|
3364
3376
|
* 禁用文本区域
|
|
@@ -3366,7 +3378,8 @@ const editorProps = {
|
|
|
3366
3378
|
* @default false
|
|
3367
3379
|
*/
|
|
3368
3380
|
disabled: {
|
|
3369
|
-
type: Boolean
|
|
3381
|
+
type: Boolean,
|
|
3382
|
+
default: false
|
|
3370
3383
|
},
|
|
3371
3384
|
/**
|
|
3372
3385
|
* 文本区域为只读
|
|
@@ -3374,13 +3387,15 @@ const editorProps = {
|
|
|
3374
3387
|
* @default false
|
|
3375
3388
|
*/
|
|
3376
3389
|
readOnly: {
|
|
3377
|
-
type: Boolean
|
|
3390
|
+
type: Boolean,
|
|
3391
|
+
default: false
|
|
3378
3392
|
},
|
|
3379
3393
|
/**
|
|
3380
3394
|
* 文本区域允许的最大字符数
|
|
3381
3395
|
*/
|
|
3382
3396
|
maxLength: {
|
|
3383
|
-
type: Number
|
|
3397
|
+
type: Number,
|
|
3398
|
+
default: void 0
|
|
3384
3399
|
},
|
|
3385
3400
|
/**
|
|
3386
3401
|
* 是否启用自动识别粘贴代码类别
|
|
@@ -3389,19 +3404,22 @@ const editorProps = {
|
|
|
3389
3404
|
* @default false
|
|
3390
3405
|
*/
|
|
3391
3406
|
autoDetectCode: {
|
|
3392
|
-
type: Boolean
|
|
3407
|
+
type: Boolean,
|
|
3408
|
+
default: false
|
|
3393
3409
|
},
|
|
3394
3410
|
/**
|
|
3395
3411
|
* 输入框失去焦点时触发事件
|
|
3396
3412
|
*/
|
|
3397
3413
|
onBlur: {
|
|
3398
|
-
type: Function
|
|
3414
|
+
type: Function,
|
|
3415
|
+
default: void 0
|
|
3399
3416
|
},
|
|
3400
3417
|
/**
|
|
3401
3418
|
* 输入框获得焦点时触发事件
|
|
3402
3419
|
*/
|
|
3403
3420
|
onFocus: {
|
|
3404
|
-
type: Function
|
|
3421
|
+
type: Function,
|
|
3422
|
+
default: void 0
|
|
3405
3423
|
},
|
|
3406
3424
|
/**
|
|
3407
3425
|
* @codemirror/autocomplete匹配关键词的方法列表
|
|
@@ -3414,7 +3432,8 @@ const editorProps = {
|
|
|
3414
3432
|
* })
|
|
3415
3433
|
*/
|
|
3416
3434
|
completions: {
|
|
3417
|
-
type: Array
|
|
3435
|
+
type: Array,
|
|
3436
|
+
default: void 0
|
|
3418
3437
|
},
|
|
3419
3438
|
/**
|
|
3420
3439
|
* 是否在工具栏下面显示对应的文字名称
|
|
@@ -3429,10 +3448,12 @@ const editorProps = {
|
|
|
3429
3448
|
* 字符输入事件
|
|
3430
3449
|
*/
|
|
3431
3450
|
onInput: {
|
|
3432
|
-
type: Function
|
|
3451
|
+
type: Function,
|
|
3452
|
+
default: void 0
|
|
3433
3453
|
},
|
|
3434
3454
|
onDrop: {
|
|
3435
|
-
type: Function
|
|
3455
|
+
type: Function,
|
|
3456
|
+
default: void 0
|
|
3436
3457
|
},
|
|
3437
3458
|
/**
|
|
3438
3459
|
* 输入框的默认宽度
|
|
@@ -3448,7 +3469,8 @@ const editorProps = {
|
|
|
3448
3469
|
* 输入框宽度变化事件
|
|
3449
3470
|
*/
|
|
3450
3471
|
onInputBoxWitdhChange: {
|
|
3451
|
-
type: Function
|
|
3472
|
+
type: Function,
|
|
3473
|
+
default: void 0
|
|
3452
3474
|
},
|
|
3453
3475
|
/**
|
|
3454
3476
|
* 替换粘贴的图片链接
|
|
@@ -129,39 +129,52 @@ const props = {
|
|
|
129
129
|
default: ""
|
|
130
130
|
},
|
|
131
131
|
visible: {
|
|
132
|
-
type: Boolean
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: void 0
|
|
133
134
|
},
|
|
134
135
|
// 展示在工具栏的内容,通常是个图标
|
|
135
136
|
trigger: {
|
|
136
|
-
type: [String, Object]
|
|
137
|
+
type: [String, Object],
|
|
138
|
+
default: void 0
|
|
137
139
|
},
|
|
138
140
|
onChange: {
|
|
139
|
-
type: Function
|
|
141
|
+
type: Function,
|
|
142
|
+
default: void 0
|
|
140
143
|
},
|
|
141
144
|
// 下拉框中的内容
|
|
142
145
|
overlay: {
|
|
143
|
-
type: [String, Object]
|
|
146
|
+
type: [String, Object],
|
|
147
|
+
default: void 0
|
|
144
148
|
},
|
|
145
149
|
/**
|
|
146
150
|
* ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
|
|
147
151
|
*/
|
|
148
152
|
insert: {
|
|
149
|
-
type: Function
|
|
153
|
+
type: Function,
|
|
154
|
+
default: void 0
|
|
150
155
|
},
|
|
151
156
|
language: {
|
|
152
|
-
type: String
|
|
157
|
+
type: String,
|
|
158
|
+
default: void 0
|
|
153
159
|
},
|
|
154
160
|
theme: {
|
|
155
|
-
type: String
|
|
161
|
+
type: String,
|
|
162
|
+
default: void 0
|
|
156
163
|
},
|
|
157
164
|
previewTheme: {
|
|
158
|
-
type: String
|
|
165
|
+
type: String,
|
|
166
|
+
default: void 0
|
|
167
|
+
},
|
|
168
|
+
codeTheme: {
|
|
169
|
+
type: String,
|
|
170
|
+
default: void 0
|
|
159
171
|
},
|
|
160
172
|
/**
|
|
161
173
|
* ==结束
|
|
162
174
|
*/
|
|
163
175
|
default: {
|
|
164
|
-
type: [String, Object]
|
|
176
|
+
type: [String, Object],
|
|
177
|
+
default: void 0
|
|
165
178
|
}
|
|
166
179
|
};
|
|
167
180
|
const DropdownToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -354,7 +354,8 @@ const props = {
|
|
|
354
354
|
* 编辑器的Id,务必与需要绑定的编辑器Id相同
|
|
355
355
|
*/
|
|
356
356
|
editorId: {
|
|
357
|
-
type: String
|
|
357
|
+
type: String,
|
|
358
|
+
default: void 0
|
|
358
359
|
},
|
|
359
360
|
class: {
|
|
360
361
|
type: String,
|
|
@@ -371,7 +372,8 @@ const props = {
|
|
|
371
372
|
* 默认:#md-editor-preview-wrapper
|
|
372
373
|
*/
|
|
373
374
|
scrollElement: {
|
|
374
|
-
type: [String, Object]
|
|
375
|
+
type: [String, Object],
|
|
376
|
+
default: void 0
|
|
375
377
|
},
|
|
376
378
|
theme: {
|
|
377
379
|
type: String,
|
|
@@ -396,10 +398,12 @@ const props = {
|
|
|
396
398
|
default: 0
|
|
397
399
|
},
|
|
398
400
|
onClick: {
|
|
399
|
-
type: Function
|
|
401
|
+
type: Function,
|
|
402
|
+
default: void 0
|
|
400
403
|
},
|
|
401
404
|
onActive: {
|
|
402
|
-
type: Function
|
|
405
|
+
type: Function,
|
|
406
|
+
default: void 0
|
|
403
407
|
},
|
|
404
408
|
/**
|
|
405
409
|
* 滚动容器是否在web component中,默认不在
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -13,7 +13,8 @@ const config$1 = require("./chunks/config.cjs");
|
|
|
13
13
|
const config = require("./config.cjs");
|
|
14
14
|
const props = {
|
|
15
15
|
onClick: {
|
|
16
|
-
type: Function
|
|
16
|
+
type: Function,
|
|
17
|
+
default: void 0
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
const NormalFooterToolbar = /* @__PURE__ */ vue.defineComponent({
|
package/lib/es/MdEditor.mjs
CHANGED
|
@@ -82,6 +82,9 @@ const toolbarProps = {
|
|
|
82
82
|
},
|
|
83
83
|
catalogVisible: {
|
|
84
84
|
type: Boolean
|
|
85
|
+
},
|
|
86
|
+
codeTheme: {
|
|
87
|
+
type: String
|
|
85
88
|
}
|
|
86
89
|
};
|
|
87
90
|
const useSreenfull = (props2) => {
|
|
@@ -578,7 +581,7 @@ const ToolBar = /* @__PURE__ */ defineComponent({
|
|
|
578
581
|
uploadRef.value.addEventListener("change", uploadHandler);
|
|
579
582
|
});
|
|
580
583
|
const barRender = (barItem) => {
|
|
581
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa;
|
|
584
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa;
|
|
582
585
|
if (allToolbar.includes(barItem)) {
|
|
583
586
|
switch (barItem) {
|
|
584
587
|
case "-": {
|
|
@@ -1190,9 +1193,10 @@ const ToolBar = /* @__PURE__ */ defineComponent({
|
|
|
1190
1193
|
const defItem = props2.defToolbars[barItem];
|
|
1191
1194
|
if (defItem) {
|
|
1192
1195
|
const defItemCloned = cloneVNode(defItem, {
|
|
1193
|
-
theme: theme.value,
|
|
1194
|
-
previewTheme: previewTheme.value,
|
|
1195
|
-
language: language.value,
|
|
1196
|
+
theme: ((_pa = defItem.props) == null ? void 0 : _pa.theme) || theme.value,
|
|
1197
|
+
previewTheme: ((_qa = defItem.props) == null ? void 0 : _qa.theme) || previewTheme.value,
|
|
1198
|
+
language: ((_ra = defItem.props) == null ? void 0 : _ra.theme) || language.value,
|
|
1199
|
+
codeTheme: ((_sa = defItem.props) == null ? void 0 : _sa.codeTheme) || props2.codeTheme,
|
|
1196
1200
|
insert(generate) {
|
|
1197
1201
|
bus.emit(editorId, REPLACE, "universal", {
|
|
1198
1202
|
generate
|
|
@@ -1206,9 +1210,10 @@ const ToolBar = /* @__PURE__ */ defineComponent({
|
|
|
1206
1210
|
const defItem = props2.defToolbars.children[barItem];
|
|
1207
1211
|
if (defItem) {
|
|
1208
1212
|
const defItemCloned = cloneVNode(defItem, {
|
|
1209
|
-
theme: theme.value,
|
|
1210
|
-
previewTheme: previewTheme.value,
|
|
1211
|
-
language: language.value,
|
|
1213
|
+
theme: ((_ta = defItem.props) == null ? void 0 : _ta.theme) || theme.value,
|
|
1214
|
+
previewTheme: ((_ua = defItem.props) == null ? void 0 : _ua.theme) || previewTheme.value,
|
|
1215
|
+
language: ((_va = defItem.props) == null ? void 0 : _va.theme) || language.value,
|
|
1216
|
+
codeTheme: ((_wa = defItem.props) == null ? void 0 : _wa.codeTheme) || props2.codeTheme,
|
|
1212
1217
|
insert(generate) {
|
|
1213
1218
|
bus.emit(editorId, REPLACE, "universal", {
|
|
1214
1219
|
generate
|
|
@@ -3023,7 +3028,8 @@ const Editor = /* @__PURE__ */ defineComponent({
|
|
|
3023
3028
|
"defToolbars": defToolbars,
|
|
3024
3029
|
"noUploadImg": noUploadImg,
|
|
3025
3030
|
"showToolbarName": props2.showToolbarName,
|
|
3026
|
-
"catalogVisible": catalogVisible.value
|
|
3031
|
+
"catalogVisible": catalogVisible.value,
|
|
3032
|
+
"codeTheme": props2.codeTheme
|
|
3027
3033
|
}, null), createVNode(Content, {
|
|
3028
3034
|
"ref": codeRef,
|
|
3029
3035
|
"modelValue": props2.modelValue,
|
package/lib/es/ModalToolbar.mjs
CHANGED
|
@@ -15,7 +15,8 @@ const props = {
|
|
|
15
15
|
default: ""
|
|
16
16
|
},
|
|
17
17
|
visible: {
|
|
18
|
-
type: Boolean
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: void 0
|
|
19
20
|
},
|
|
20
21
|
width: {
|
|
21
22
|
type: String,
|
|
@@ -27,13 +28,16 @@ const props = {
|
|
|
27
28
|
},
|
|
28
29
|
// 展示在工具栏的内容,通常是个图标
|
|
29
30
|
trigger: {
|
|
30
|
-
type: [String, Object]
|
|
31
|
+
type: [String, Object],
|
|
32
|
+
default: void 0
|
|
31
33
|
},
|
|
32
34
|
onClick: {
|
|
33
|
-
type: Function
|
|
35
|
+
type: Function,
|
|
36
|
+
default: void 0
|
|
34
37
|
},
|
|
35
38
|
onClose: {
|
|
36
|
-
type: Function
|
|
39
|
+
type: Function,
|
|
40
|
+
default: void 0
|
|
37
41
|
},
|
|
38
42
|
/**
|
|
39
43
|
* 显示全屏按钮
|
|
@@ -47,13 +51,16 @@ const props = {
|
|
|
47
51
|
default: false
|
|
48
52
|
},
|
|
49
53
|
onAdjust: {
|
|
50
|
-
type: Function
|
|
54
|
+
type: Function,
|
|
55
|
+
default: void 0
|
|
51
56
|
},
|
|
52
57
|
class: {
|
|
53
|
-
type: String
|
|
58
|
+
type: String,
|
|
59
|
+
default: void 0
|
|
54
60
|
},
|
|
55
61
|
style: {
|
|
56
|
-
type: [Object, String]
|
|
62
|
+
type: [Object, String],
|
|
63
|
+
default: void 0
|
|
57
64
|
},
|
|
58
65
|
showMask: {
|
|
59
66
|
type: Boolean,
|
|
@@ -63,16 +70,24 @@ const props = {
|
|
|
63
70
|
* ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
|
|
64
71
|
*/
|
|
65
72
|
insert: {
|
|
66
|
-
type: Function
|
|
73
|
+
type: Function,
|
|
74
|
+
default: void 0
|
|
67
75
|
},
|
|
68
76
|
language: {
|
|
69
|
-
type: String
|
|
77
|
+
type: String,
|
|
78
|
+
default: void 0
|
|
70
79
|
},
|
|
71
80
|
theme: {
|
|
72
|
-
type: String
|
|
81
|
+
type: String,
|
|
82
|
+
default: void 0
|
|
73
83
|
},
|
|
74
84
|
previewTheme: {
|
|
75
|
-
type: String
|
|
85
|
+
type: String,
|
|
86
|
+
default: void 0
|
|
87
|
+
},
|
|
88
|
+
codeTheme: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: void 0
|
|
76
91
|
}
|
|
77
92
|
/**
|
|
78
93
|
* ==结束
|
package/lib/es/NormalToolbar.mjs
CHANGED
|
@@ -8,22 +8,35 @@ const props = {
|
|
|
8
8
|
},
|
|
9
9
|
// 展示在工具栏的内容,通常是个图标
|
|
10
10
|
trigger: {
|
|
11
|
-
type: [String, Object]
|
|
11
|
+
type: [String, Object],
|
|
12
|
+
default: void 0
|
|
12
13
|
},
|
|
13
14
|
onClick: {
|
|
14
|
-
type: Function
|
|
15
|
+
type: Function,
|
|
16
|
+
default: void 0
|
|
15
17
|
},
|
|
16
18
|
/**
|
|
17
19
|
* ==没有意义,仅用于规避克隆组件自动嵌入insert方法时,传入的是该组件而产生的waring
|
|
18
20
|
*/
|
|
19
21
|
insert: {
|
|
20
|
-
type: Function
|
|
22
|
+
type: Function,
|
|
23
|
+
default: void 0
|
|
21
24
|
},
|
|
22
25
|
language: {
|
|
23
|
-
type: String
|
|
26
|
+
type: String,
|
|
27
|
+
default: void 0
|
|
24
28
|
},
|
|
25
29
|
theme: {
|
|
26
|
-
type: String
|
|
30
|
+
type: String,
|
|
31
|
+
default: void 0
|
|
32
|
+
},
|
|
33
|
+
previewTheme: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: void 0
|
|
36
|
+
},
|
|
37
|
+
codeTheme: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: void 0
|
|
27
40
|
}
|
|
28
41
|
/**
|
|
29
42
|
* ==结束
|