@deot/vc-components 1.0.55 → 1.0.56
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/dist/index.cjs +21 -36
- package/dist/index.iife.js +21 -36
- package/dist/index.js +21 -36
- package/dist/index.umd.cjs +21 -36
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -10091,23 +10091,16 @@ const insertFontSizeStyle = (value, id) => {
|
|
|
10091
10091
|
.ql-snow .ql-font-size.ql-picker .ql-picker-label[data-value="${fontSize}"]:before {
|
|
10092
10092
|
content: "${fontSize}"
|
|
10093
10093
|
}`;
|
|
10094
|
-
pre += `.ql-editor .ql-font-size-${fontSize} {
|
|
10095
|
-
font-size: ${fontSize};
|
|
10096
|
-
}`;
|
|
10097
10094
|
return pre;
|
|
10098
10095
|
}, "");
|
|
10099
10096
|
return Load__namespace.style(code, { id });
|
|
10100
10097
|
};
|
|
10101
10098
|
const insertLineHeightStyle = (value, id) => {
|
|
10102
10099
|
const code = value.reduce((pre, lineHeight) => {
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
.ql-snow .ql-line-height.ql-picker .ql-picker-label[data-value="${classLineHeightValue}"]:before {
|
|
10100
|
+
pre += `.ql-snow .ql-line-height.ql-picker .ql-picker-item[data-value="${lineHeight}"]:before,
|
|
10101
|
+
.ql-snow .ql-line-height.ql-picker .ql-picker-label[data-value="${lineHeight}"]:before {
|
|
10106
10102
|
content: "${+lineHeight}"
|
|
10107
10103
|
}`;
|
|
10108
|
-
pre += `.ql-editor .ql-line-height-${classLineHeightValue} {
|
|
10109
|
-
line-height: ${+lineHeight};
|
|
10110
|
-
}`;
|
|
10111
10104
|
return pre;
|
|
10112
10105
|
}, "");
|
|
10113
10106
|
return Load__namespace.style(code, { id });
|
|
@@ -10118,9 +10111,6 @@ const insertLetterSpacingStyle = (value, id) => {
|
|
|
10118
10111
|
.ql-snow .ql-letter-spacing.ql-picker .ql-picker-label[data-value="${letterSpacing}"]:before {
|
|
10119
10112
|
content: "${letterSpacing}"
|
|
10120
10113
|
}`;
|
|
10121
|
-
pre += `.ql-editor .ql-letter-spacing-${letterSpacing} {
|
|
10122
|
-
letter-spacing: ${letterSpacing};
|
|
10123
|
-
}`;
|
|
10124
10114
|
return pre;
|
|
10125
10115
|
}, "");
|
|
10126
10116
|
return Load__namespace.style(code, { id });
|
|
@@ -10308,9 +10298,8 @@ const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
|
10308
10298
|
"selected": true
|
|
10309
10299
|
}, null);
|
|
10310
10300
|
}
|
|
10311
|
-
const v = key === 'line-height' ? +it * 10 : it;
|
|
10312
10301
|
return vue.createVNode("option", {
|
|
10313
|
-
"value": `${
|
|
10302
|
+
"value": `${it}`
|
|
10314
10303
|
}, null);
|
|
10315
10304
|
})]);
|
|
10316
10305
|
}
|
|
@@ -10323,16 +10312,18 @@ const EditorToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
|
10323
10312
|
if (Array.isArray(item)) {
|
|
10324
10313
|
return insertStyle(item);
|
|
10325
10314
|
}
|
|
10315
|
+
let key = item;
|
|
10316
|
+
let value = [];
|
|
10326
10317
|
if (typeof item === 'object') {
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10318
|
+
[key, value] = Object.entries(item)[0];
|
|
10319
|
+
}
|
|
10320
|
+
value = value.length && value || toolbarDefaultsMap[key];
|
|
10321
|
+
if (key === 'font-size' && Array.isArray(value)) {
|
|
10322
|
+
insertFontSizeStyle(value, styleId);
|
|
10323
|
+
} else if (key === 'line-height') {
|
|
10324
|
+
insertLineHeightStyle(value, lineHeightStyleId);
|
|
10325
|
+
} else if (key === 'letter-spacing') {
|
|
10326
|
+
insertLetterSpacingStyle(value, letterSpacingStyleId);
|
|
10336
10327
|
}
|
|
10337
10328
|
});
|
|
10338
10329
|
};
|
|
@@ -10413,21 +10404,20 @@ const registerAudioBlot = (quillInstance) => {
|
|
|
10413
10404
|
|
|
10414
10405
|
const registerLineHeight = (quillInstance) => {
|
|
10415
10406
|
const lineHeight = toolbarDefaultsMap["line-height"];
|
|
10416
|
-
const whitelist = lineHeight.map((i) => String(+i * 10));
|
|
10417
10407
|
const Parchment = quillInstance.import("parchment");
|
|
10418
|
-
const lineHeightStyle = new Parchment.
|
|
10408
|
+
const lineHeightStyle = new Parchment.StyleAttributor(
|
|
10409
|
+
"line-height",
|
|
10419
10410
|
"line-height",
|
|
10420
|
-
|
|
10421
|
-
{ scope: Parchment.Scope.INLINE, whitelist }
|
|
10411
|
+
{ scope: Parchment.Scope.INLINE, whitelist: lineHeight }
|
|
10422
10412
|
);
|
|
10423
10413
|
quillInstance.register({ "formats/line-height": lineHeightStyle }, true);
|
|
10424
10414
|
};
|
|
10425
10415
|
|
|
10426
10416
|
const registerLetterSpacing = (quillInstance) => {
|
|
10427
10417
|
const Parchment = quillInstance.import("parchment");
|
|
10428
|
-
const letterSpacingStyle = new Parchment.
|
|
10418
|
+
const letterSpacingStyle = new Parchment.StyleAttributor(
|
|
10419
|
+
"letter-spacing",
|
|
10429
10420
|
"letter-spacing",
|
|
10430
|
-
"ql-letter-spacing",
|
|
10431
10421
|
{
|
|
10432
10422
|
scope: Parchment.Scope.INLINE,
|
|
10433
10423
|
whitelist: toolbarDefaultsMap["letter-spacing"]
|
|
@@ -11111,18 +11101,12 @@ const registerEventModule = (QuillClass) => {
|
|
|
11111
11101
|
const registerFontSize = (editor) => {
|
|
11112
11102
|
const Parchment = editor.import("parchment");
|
|
11113
11103
|
const fontSize = toolbarDefaultsMap["font-size"];
|
|
11114
|
-
const SizeClass = new Parchment.ClassAttributor("font-size", "ql-font-size", {
|
|
11115
|
-
scope: Parchment.Scope.INLINE,
|
|
11116
|
-
whitelist: fontSize
|
|
11117
|
-
});
|
|
11118
11104
|
const SizeStyle = new Parchment.StyleAttributor("font-size", "font-size", {
|
|
11119
11105
|
scope: Parchment.Scope.INLINE,
|
|
11120
11106
|
whitelist: fontSize
|
|
11121
11107
|
});
|
|
11122
11108
|
editor.register({
|
|
11123
|
-
"formats/font-size":
|
|
11124
|
-
"attributors/class/font-size": SizeClass,
|
|
11125
|
-
"attributors/style/font-size": SizeStyle
|
|
11109
|
+
"formats/font-size": SizeStyle
|
|
11126
11110
|
}, true);
|
|
11127
11111
|
};
|
|
11128
11112
|
|
|
@@ -11180,6 +11164,7 @@ const COMPONENT_NAME$14 = 'vc-editor';
|
|
|
11180
11164
|
const Editor = /* @__PURE__ */ vue.defineComponent({
|
|
11181
11165
|
name: COMPONENT_NAME$14,
|
|
11182
11166
|
props: props$M,
|
|
11167
|
+
defaults,
|
|
11183
11168
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
11184
11169
|
setup(props, {
|
|
11185
11170
|
slots,
|
package/dist/index.iife.js
CHANGED
|
@@ -16544,23 +16544,16 @@ var VcComponents = (function (exports, vue) {
|
|
|
16544
16544
|
.ql-snow .ql-font-size.ql-picker .ql-picker-label[data-value="${fontSize}"]:before {
|
|
16545
16545
|
content: "${fontSize}"
|
|
16546
16546
|
}`;
|
|
16547
|
-
pre += `.ql-editor .ql-font-size-${fontSize} {
|
|
16548
|
-
font-size: ${fontSize};
|
|
16549
|
-
}`;
|
|
16550
16547
|
return pre;
|
|
16551
16548
|
}, "");
|
|
16552
16549
|
return style(code, { id });
|
|
16553
16550
|
};
|
|
16554
16551
|
const insertLineHeightStyle = (value, id) => {
|
|
16555
16552
|
const code = value.reduce((pre, lineHeight) => {
|
|
16556
|
-
|
|
16557
|
-
|
|
16558
|
-
.ql-snow .ql-line-height.ql-picker .ql-picker-label[data-value="${classLineHeightValue}"]:before {
|
|
16553
|
+
pre += `.ql-snow .ql-line-height.ql-picker .ql-picker-item[data-value="${lineHeight}"]:before,
|
|
16554
|
+
.ql-snow .ql-line-height.ql-picker .ql-picker-label[data-value="${lineHeight}"]:before {
|
|
16559
16555
|
content: "${+lineHeight}"
|
|
16560
16556
|
}`;
|
|
16561
|
-
pre += `.ql-editor .ql-line-height-${classLineHeightValue} {
|
|
16562
|
-
line-height: ${+lineHeight};
|
|
16563
|
-
}`;
|
|
16564
16557
|
return pre;
|
|
16565
16558
|
}, "");
|
|
16566
16559
|
return style(code, { id });
|
|
@@ -16571,9 +16564,6 @@ var VcComponents = (function (exports, vue) {
|
|
|
16571
16564
|
.ql-snow .ql-letter-spacing.ql-picker .ql-picker-label[data-value="${letterSpacing}"]:before {
|
|
16572
16565
|
content: "${letterSpacing}"
|
|
16573
16566
|
}`;
|
|
16574
|
-
pre += `.ql-editor .ql-letter-spacing-${letterSpacing} {
|
|
16575
|
-
letter-spacing: ${letterSpacing};
|
|
16576
|
-
}`;
|
|
16577
16567
|
return pre;
|
|
16578
16568
|
}, "");
|
|
16579
16569
|
return style(code, { id });
|
|
@@ -16761,9 +16751,8 @@ var VcComponents = (function (exports, vue) {
|
|
|
16761
16751
|
"selected": true
|
|
16762
16752
|
}, null);
|
|
16763
16753
|
}
|
|
16764
|
-
const v = key === 'line-height' ? +it * 10 : it;
|
|
16765
16754
|
return vue.createVNode("option", {
|
|
16766
|
-
"value": `${
|
|
16755
|
+
"value": `${it}`
|
|
16767
16756
|
}, null);
|
|
16768
16757
|
})]);
|
|
16769
16758
|
}
|
|
@@ -16776,16 +16765,18 @@ var VcComponents = (function (exports, vue) {
|
|
|
16776
16765
|
if (Array.isArray(item)) {
|
|
16777
16766
|
return insertStyle(item);
|
|
16778
16767
|
}
|
|
16768
|
+
let key = item;
|
|
16769
|
+
let value = [];
|
|
16779
16770
|
if (typeof item === 'object') {
|
|
16780
|
-
|
|
16781
|
-
|
|
16782
|
-
|
|
16783
|
-
|
|
16784
|
-
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
|
|
16771
|
+
[key, value] = Object.entries(item)[0];
|
|
16772
|
+
}
|
|
16773
|
+
value = value.length && value || toolbarDefaultsMap[key];
|
|
16774
|
+
if (key === 'font-size' && Array.isArray(value)) {
|
|
16775
|
+
insertFontSizeStyle(value, styleId);
|
|
16776
|
+
} else if (key === 'line-height') {
|
|
16777
|
+
insertLineHeightStyle(value, lineHeightStyleId);
|
|
16778
|
+
} else if (key === 'letter-spacing') {
|
|
16779
|
+
insertLetterSpacingStyle(value, letterSpacingStyleId);
|
|
16789
16780
|
}
|
|
16790
16781
|
});
|
|
16791
16782
|
};
|
|
@@ -16866,21 +16857,20 @@ var VcComponents = (function (exports, vue) {
|
|
|
16866
16857
|
|
|
16867
16858
|
const registerLineHeight = (quillInstance) => {
|
|
16868
16859
|
const lineHeight = toolbarDefaultsMap["line-height"];
|
|
16869
|
-
const whitelist = lineHeight.map((i) => String(+i * 10));
|
|
16870
16860
|
const Parchment = quillInstance.import("parchment");
|
|
16871
|
-
const lineHeightStyle = new Parchment.
|
|
16861
|
+
const lineHeightStyle = new Parchment.StyleAttributor(
|
|
16862
|
+
"line-height",
|
|
16872
16863
|
"line-height",
|
|
16873
|
-
|
|
16874
|
-
{ scope: Parchment.Scope.INLINE, whitelist }
|
|
16864
|
+
{ scope: Parchment.Scope.INLINE, whitelist: lineHeight }
|
|
16875
16865
|
);
|
|
16876
16866
|
quillInstance.register({ "formats/line-height": lineHeightStyle }, true);
|
|
16877
16867
|
};
|
|
16878
16868
|
|
|
16879
16869
|
const registerLetterSpacing = (quillInstance) => {
|
|
16880
16870
|
const Parchment = quillInstance.import("parchment");
|
|
16881
|
-
const letterSpacingStyle = new Parchment.
|
|
16871
|
+
const letterSpacingStyle = new Parchment.StyleAttributor(
|
|
16872
|
+
"letter-spacing",
|
|
16882
16873
|
"letter-spacing",
|
|
16883
|
-
"ql-letter-spacing",
|
|
16884
16874
|
{
|
|
16885
16875
|
scope: Parchment.Scope.INLINE,
|
|
16886
16876
|
whitelist: toolbarDefaultsMap["letter-spacing"]
|
|
@@ -19522,18 +19512,12 @@ var VcComponents = (function (exports, vue) {
|
|
|
19522
19512
|
const registerFontSize = (editor) => {
|
|
19523
19513
|
const Parchment = editor.import("parchment");
|
|
19524
19514
|
const fontSize = toolbarDefaultsMap["font-size"];
|
|
19525
|
-
const SizeClass = new Parchment.ClassAttributor("font-size", "ql-font-size", {
|
|
19526
|
-
scope: Parchment.Scope.INLINE,
|
|
19527
|
-
whitelist: fontSize
|
|
19528
|
-
});
|
|
19529
19515
|
const SizeStyle = new Parchment.StyleAttributor("font-size", "font-size", {
|
|
19530
19516
|
scope: Parchment.Scope.INLINE,
|
|
19531
19517
|
whitelist: fontSize
|
|
19532
19518
|
});
|
|
19533
19519
|
editor.register({
|
|
19534
|
-
"formats/font-size":
|
|
19535
|
-
"attributors/class/font-size": SizeClass,
|
|
19536
|
-
"attributors/style/font-size": SizeStyle
|
|
19520
|
+
"formats/font-size": SizeStyle
|
|
19537
19521
|
}, true);
|
|
19538
19522
|
};
|
|
19539
19523
|
|
|
@@ -19591,6 +19575,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
19591
19575
|
const Editor$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19592
19576
|
name: COMPONENT_NAME$14,
|
|
19593
19577
|
props: props$M,
|
|
19578
|
+
defaults: defaults$1,
|
|
19594
19579
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
19595
19580
|
setup(props, {
|
|
19596
19581
|
slots,
|
package/dist/index.js
CHANGED
|
@@ -10069,23 +10069,16 @@ const insertFontSizeStyle = (value, id) => {
|
|
|
10069
10069
|
.ql-snow .ql-font-size.ql-picker .ql-picker-label[data-value="${fontSize}"]:before {
|
|
10070
10070
|
content: "${fontSize}"
|
|
10071
10071
|
}`;
|
|
10072
|
-
pre += `.ql-editor .ql-font-size-${fontSize} {
|
|
10073
|
-
font-size: ${fontSize};
|
|
10074
|
-
}`;
|
|
10075
10072
|
return pre;
|
|
10076
10073
|
}, "");
|
|
10077
10074
|
return Load.style(code, { id });
|
|
10078
10075
|
};
|
|
10079
10076
|
const insertLineHeightStyle = (value, id) => {
|
|
10080
10077
|
const code = value.reduce((pre, lineHeight) => {
|
|
10081
|
-
|
|
10082
|
-
|
|
10083
|
-
.ql-snow .ql-line-height.ql-picker .ql-picker-label[data-value="${classLineHeightValue}"]:before {
|
|
10078
|
+
pre += `.ql-snow .ql-line-height.ql-picker .ql-picker-item[data-value="${lineHeight}"]:before,
|
|
10079
|
+
.ql-snow .ql-line-height.ql-picker .ql-picker-label[data-value="${lineHeight}"]:before {
|
|
10084
10080
|
content: "${+lineHeight}"
|
|
10085
10081
|
}`;
|
|
10086
|
-
pre += `.ql-editor .ql-line-height-${classLineHeightValue} {
|
|
10087
|
-
line-height: ${+lineHeight};
|
|
10088
|
-
}`;
|
|
10089
10082
|
return pre;
|
|
10090
10083
|
}, "");
|
|
10091
10084
|
return Load.style(code, { id });
|
|
@@ -10096,9 +10089,6 @@ const insertLetterSpacingStyle = (value, id) => {
|
|
|
10096
10089
|
.ql-snow .ql-letter-spacing.ql-picker .ql-picker-label[data-value="${letterSpacing}"]:before {
|
|
10097
10090
|
content: "${letterSpacing}"
|
|
10098
10091
|
}`;
|
|
10099
|
-
pre += `.ql-editor .ql-letter-spacing-${letterSpacing} {
|
|
10100
|
-
letter-spacing: ${letterSpacing};
|
|
10101
|
-
}`;
|
|
10102
10092
|
return pre;
|
|
10103
10093
|
}, "");
|
|
10104
10094
|
return Load.style(code, { id });
|
|
@@ -10286,9 +10276,8 @@ const EditorToolbar = /* @__PURE__ */ defineComponent({
|
|
|
10286
10276
|
"selected": true
|
|
10287
10277
|
}, null);
|
|
10288
10278
|
}
|
|
10289
|
-
const v = key === 'line-height' ? +it * 10 : it;
|
|
10290
10279
|
return createVNode("option", {
|
|
10291
|
-
"value": `${
|
|
10280
|
+
"value": `${it}`
|
|
10292
10281
|
}, null);
|
|
10293
10282
|
})]);
|
|
10294
10283
|
}
|
|
@@ -10301,16 +10290,18 @@ const EditorToolbar = /* @__PURE__ */ defineComponent({
|
|
|
10301
10290
|
if (Array.isArray(item)) {
|
|
10302
10291
|
return insertStyle(item);
|
|
10303
10292
|
}
|
|
10293
|
+
let key = item;
|
|
10294
|
+
let value = [];
|
|
10304
10295
|
if (typeof item === 'object') {
|
|
10305
|
-
|
|
10306
|
-
|
|
10307
|
-
|
|
10308
|
-
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10296
|
+
[key, value] = Object.entries(item)[0];
|
|
10297
|
+
}
|
|
10298
|
+
value = value.length && value || toolbarDefaultsMap[key];
|
|
10299
|
+
if (key === 'font-size' && Array.isArray(value)) {
|
|
10300
|
+
insertFontSizeStyle(value, styleId);
|
|
10301
|
+
} else if (key === 'line-height') {
|
|
10302
|
+
insertLineHeightStyle(value, lineHeightStyleId);
|
|
10303
|
+
} else if (key === 'letter-spacing') {
|
|
10304
|
+
insertLetterSpacingStyle(value, letterSpacingStyleId);
|
|
10314
10305
|
}
|
|
10315
10306
|
});
|
|
10316
10307
|
};
|
|
@@ -10391,21 +10382,20 @@ const registerAudioBlot = (quillInstance) => {
|
|
|
10391
10382
|
|
|
10392
10383
|
const registerLineHeight = (quillInstance) => {
|
|
10393
10384
|
const lineHeight = toolbarDefaultsMap["line-height"];
|
|
10394
|
-
const whitelist = lineHeight.map((i) => String(+i * 10));
|
|
10395
10385
|
const Parchment = quillInstance.import("parchment");
|
|
10396
|
-
const lineHeightStyle = new Parchment.
|
|
10386
|
+
const lineHeightStyle = new Parchment.StyleAttributor(
|
|
10387
|
+
"line-height",
|
|
10397
10388
|
"line-height",
|
|
10398
|
-
|
|
10399
|
-
{ scope: Parchment.Scope.INLINE, whitelist }
|
|
10389
|
+
{ scope: Parchment.Scope.INLINE, whitelist: lineHeight }
|
|
10400
10390
|
);
|
|
10401
10391
|
quillInstance.register({ "formats/line-height": lineHeightStyle }, true);
|
|
10402
10392
|
};
|
|
10403
10393
|
|
|
10404
10394
|
const registerLetterSpacing = (quillInstance) => {
|
|
10405
10395
|
const Parchment = quillInstance.import("parchment");
|
|
10406
|
-
const letterSpacingStyle = new Parchment.
|
|
10396
|
+
const letterSpacingStyle = new Parchment.StyleAttributor(
|
|
10397
|
+
"letter-spacing",
|
|
10407
10398
|
"letter-spacing",
|
|
10408
|
-
"ql-letter-spacing",
|
|
10409
10399
|
{
|
|
10410
10400
|
scope: Parchment.Scope.INLINE,
|
|
10411
10401
|
whitelist: toolbarDefaultsMap["letter-spacing"]
|
|
@@ -11089,18 +11079,12 @@ const registerEventModule = (QuillClass) => {
|
|
|
11089
11079
|
const registerFontSize = (editor) => {
|
|
11090
11080
|
const Parchment = editor.import("parchment");
|
|
11091
11081
|
const fontSize = toolbarDefaultsMap["font-size"];
|
|
11092
|
-
const SizeClass = new Parchment.ClassAttributor("font-size", "ql-font-size", {
|
|
11093
|
-
scope: Parchment.Scope.INLINE,
|
|
11094
|
-
whitelist: fontSize
|
|
11095
|
-
});
|
|
11096
11082
|
const SizeStyle = new Parchment.StyleAttributor("font-size", "font-size", {
|
|
11097
11083
|
scope: Parchment.Scope.INLINE,
|
|
11098
11084
|
whitelist: fontSize
|
|
11099
11085
|
});
|
|
11100
11086
|
editor.register({
|
|
11101
|
-
"formats/font-size":
|
|
11102
|
-
"attributors/class/font-size": SizeClass,
|
|
11103
|
-
"attributors/style/font-size": SizeStyle
|
|
11087
|
+
"formats/font-size": SizeStyle
|
|
11104
11088
|
}, true);
|
|
11105
11089
|
};
|
|
11106
11090
|
|
|
@@ -11158,6 +11142,7 @@ const COMPONENT_NAME$14 = 'vc-editor';
|
|
|
11158
11142
|
const Editor = /* @__PURE__ */ defineComponent({
|
|
11159
11143
|
name: COMPONENT_NAME$14,
|
|
11160
11144
|
props: props$M,
|
|
11145
|
+
defaults,
|
|
11161
11146
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
11162
11147
|
setup(props, {
|
|
11163
11148
|
slots,
|
package/dist/index.umd.cjs
CHANGED
|
@@ -16547,23 +16547,16 @@
|
|
|
16547
16547
|
.ql-snow .ql-font-size.ql-picker .ql-picker-label[data-value="${fontSize}"]:before {
|
|
16548
16548
|
content: "${fontSize}"
|
|
16549
16549
|
}`;
|
|
16550
|
-
pre += `.ql-editor .ql-font-size-${fontSize} {
|
|
16551
|
-
font-size: ${fontSize};
|
|
16552
|
-
}`;
|
|
16553
16550
|
return pre;
|
|
16554
16551
|
}, "");
|
|
16555
16552
|
return style(code, { id });
|
|
16556
16553
|
};
|
|
16557
16554
|
const insertLineHeightStyle = (value, id) => {
|
|
16558
16555
|
const code = value.reduce((pre, lineHeight) => {
|
|
16559
|
-
|
|
16560
|
-
|
|
16561
|
-
.ql-snow .ql-line-height.ql-picker .ql-picker-label[data-value="${classLineHeightValue}"]:before {
|
|
16556
|
+
pre += `.ql-snow .ql-line-height.ql-picker .ql-picker-item[data-value="${lineHeight}"]:before,
|
|
16557
|
+
.ql-snow .ql-line-height.ql-picker .ql-picker-label[data-value="${lineHeight}"]:before {
|
|
16562
16558
|
content: "${+lineHeight}"
|
|
16563
16559
|
}`;
|
|
16564
|
-
pre += `.ql-editor .ql-line-height-${classLineHeightValue} {
|
|
16565
|
-
line-height: ${+lineHeight};
|
|
16566
|
-
}`;
|
|
16567
16560
|
return pre;
|
|
16568
16561
|
}, "");
|
|
16569
16562
|
return style(code, { id });
|
|
@@ -16574,9 +16567,6 @@
|
|
|
16574
16567
|
.ql-snow .ql-letter-spacing.ql-picker .ql-picker-label[data-value="${letterSpacing}"]:before {
|
|
16575
16568
|
content: "${letterSpacing}"
|
|
16576
16569
|
}`;
|
|
16577
|
-
pre += `.ql-editor .ql-letter-spacing-${letterSpacing} {
|
|
16578
|
-
letter-spacing: ${letterSpacing};
|
|
16579
|
-
}`;
|
|
16580
16570
|
return pre;
|
|
16581
16571
|
}, "");
|
|
16582
16572
|
return style(code, { id });
|
|
@@ -16764,9 +16754,8 @@
|
|
|
16764
16754
|
"selected": true
|
|
16765
16755
|
}, null);
|
|
16766
16756
|
}
|
|
16767
|
-
const v = key === 'line-height' ? +it * 10 : it;
|
|
16768
16757
|
return vue.createVNode("option", {
|
|
16769
|
-
"value": `${
|
|
16758
|
+
"value": `${it}`
|
|
16770
16759
|
}, null);
|
|
16771
16760
|
})]);
|
|
16772
16761
|
}
|
|
@@ -16779,16 +16768,18 @@
|
|
|
16779
16768
|
if (Array.isArray(item)) {
|
|
16780
16769
|
return insertStyle(item);
|
|
16781
16770
|
}
|
|
16771
|
+
let key = item;
|
|
16772
|
+
let value = [];
|
|
16782
16773
|
if (typeof item === 'object') {
|
|
16783
|
-
|
|
16784
|
-
|
|
16785
|
-
|
|
16786
|
-
|
|
16787
|
-
|
|
16788
|
-
|
|
16789
|
-
|
|
16790
|
-
|
|
16791
|
-
|
|
16774
|
+
[key, value] = Object.entries(item)[0];
|
|
16775
|
+
}
|
|
16776
|
+
value = value.length && value || toolbarDefaultsMap[key];
|
|
16777
|
+
if (key === 'font-size' && Array.isArray(value)) {
|
|
16778
|
+
insertFontSizeStyle(value, styleId);
|
|
16779
|
+
} else if (key === 'line-height') {
|
|
16780
|
+
insertLineHeightStyle(value, lineHeightStyleId);
|
|
16781
|
+
} else if (key === 'letter-spacing') {
|
|
16782
|
+
insertLetterSpacingStyle(value, letterSpacingStyleId);
|
|
16792
16783
|
}
|
|
16793
16784
|
});
|
|
16794
16785
|
};
|
|
@@ -16869,21 +16860,20 @@
|
|
|
16869
16860
|
|
|
16870
16861
|
const registerLineHeight = (quillInstance) => {
|
|
16871
16862
|
const lineHeight = toolbarDefaultsMap["line-height"];
|
|
16872
|
-
const whitelist = lineHeight.map((i) => String(+i * 10));
|
|
16873
16863
|
const Parchment = quillInstance.import("parchment");
|
|
16874
|
-
const lineHeightStyle = new Parchment.
|
|
16864
|
+
const lineHeightStyle = new Parchment.StyleAttributor(
|
|
16865
|
+
"line-height",
|
|
16875
16866
|
"line-height",
|
|
16876
|
-
|
|
16877
|
-
{ scope: Parchment.Scope.INLINE, whitelist }
|
|
16867
|
+
{ scope: Parchment.Scope.INLINE, whitelist: lineHeight }
|
|
16878
16868
|
);
|
|
16879
16869
|
quillInstance.register({ "formats/line-height": lineHeightStyle }, true);
|
|
16880
16870
|
};
|
|
16881
16871
|
|
|
16882
16872
|
const registerLetterSpacing = (quillInstance) => {
|
|
16883
16873
|
const Parchment = quillInstance.import("parchment");
|
|
16884
|
-
const letterSpacingStyle = new Parchment.
|
|
16874
|
+
const letterSpacingStyle = new Parchment.StyleAttributor(
|
|
16875
|
+
"letter-spacing",
|
|
16885
16876
|
"letter-spacing",
|
|
16886
|
-
"ql-letter-spacing",
|
|
16887
16877
|
{
|
|
16888
16878
|
scope: Parchment.Scope.INLINE,
|
|
16889
16879
|
whitelist: toolbarDefaultsMap["letter-spacing"]
|
|
@@ -19525,18 +19515,12 @@
|
|
|
19525
19515
|
const registerFontSize = (editor) => {
|
|
19526
19516
|
const Parchment = editor.import("parchment");
|
|
19527
19517
|
const fontSize = toolbarDefaultsMap["font-size"];
|
|
19528
|
-
const SizeClass = new Parchment.ClassAttributor("font-size", "ql-font-size", {
|
|
19529
|
-
scope: Parchment.Scope.INLINE,
|
|
19530
|
-
whitelist: fontSize
|
|
19531
|
-
});
|
|
19532
19518
|
const SizeStyle = new Parchment.StyleAttributor("font-size", "font-size", {
|
|
19533
19519
|
scope: Parchment.Scope.INLINE,
|
|
19534
19520
|
whitelist: fontSize
|
|
19535
19521
|
});
|
|
19536
19522
|
editor.register({
|
|
19537
|
-
"formats/font-size":
|
|
19538
|
-
"attributors/class/font-size": SizeClass,
|
|
19539
|
-
"attributors/style/font-size": SizeStyle
|
|
19523
|
+
"formats/font-size": SizeStyle
|
|
19540
19524
|
}, true);
|
|
19541
19525
|
};
|
|
19542
19526
|
|
|
@@ -19594,6 +19578,7 @@
|
|
|
19594
19578
|
const Editor$1 = /* @__PURE__ */ vue.defineComponent({
|
|
19595
19579
|
name: COMPONENT_NAME$14,
|
|
19596
19580
|
props: props$M,
|
|
19581
|
+
defaults: defaults$1,
|
|
19597
19582
|
emits: ['ready', 'blur', 'focus', 'input', 'update:modelValue', 'change'],
|
|
19598
19583
|
setup(props, {
|
|
19599
19584
|
slots,
|