mce 0.15.13 → 0.15.14
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.js +11 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2247,7 +2247,8 @@ const _4_1_text = defineMixin((editor) => {
|
|
|
2247
2247
|
isElement,
|
|
2248
2248
|
config,
|
|
2249
2249
|
elementSelection,
|
|
2250
|
-
textSelection
|
|
2250
|
+
textSelection,
|
|
2251
|
+
fonts
|
|
2251
2252
|
} = editor;
|
|
2252
2253
|
const element = computed(() => elementSelection.value[0]);
|
|
2253
2254
|
const hasTextSelectionRange = computed(() => {
|
|
@@ -2279,6 +2280,7 @@ const _4_1_text = defineMixin((editor) => {
|
|
|
2279
2280
|
return char2.content;
|
|
2280
2281
|
}).join("");
|
|
2281
2282
|
const { boundingBox } = measureText({
|
|
2283
|
+
fonts,
|
|
2282
2284
|
style: {
|
|
2283
2285
|
...element3.style.toJSON(),
|
|
2284
2286
|
width: "auto"
|
|
@@ -2350,6 +2352,7 @@ const _4_1_text = defineMixin((editor) => {
|
|
|
2350
2352
|
break;
|
|
2351
2353
|
}
|
|
2352
2354
|
const { boundingBox } = measureText({
|
|
2355
|
+
fonts,
|
|
2353
2356
|
style,
|
|
2354
2357
|
content: element3.text.content
|
|
2355
2358
|
});
|
|
@@ -15113,6 +15116,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
15113
15116
|
return false;
|
|
15114
15117
|
}
|
|
15115
15118
|
if (!element.text.isValid()) {
|
|
15119
|
+
element.style.textAlign = "center";
|
|
15116
15120
|
element.text.setContent(" ");
|
|
15117
15121
|
}
|
|
15118
15122
|
element.text.update();
|
|
@@ -15122,13 +15126,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
15122
15126
|
await nextTick();
|
|
15123
15127
|
if (editor.pointerDown(e)) {
|
|
15124
15128
|
editor.selectAll();
|
|
15125
|
-
editor._updateSelectionByDom();
|
|
15126
15129
|
return true;
|
|
15127
15130
|
}
|
|
15128
15131
|
return false;
|
|
15129
15132
|
}
|
|
15130
|
-
onBeforeMount(() =>
|
|
15131
|
-
|
|
15133
|
+
onBeforeMount(() => {
|
|
15134
|
+
registerCommand({ command: "startTyping", handle: startTyping });
|
|
15135
|
+
});
|
|
15136
|
+
onBeforeUnmount(() => {
|
|
15137
|
+
unregisterCommand("startTyping");
|
|
15138
|
+
});
|
|
15132
15139
|
__expose({
|
|
15133
15140
|
textEditor
|
|
15134
15141
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mce",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.15.
|
|
4
|
+
"version": "0.15.14",
|
|
5
5
|
"description": "The headless canvas editor framework. only the ESM.",
|
|
6
6
|
"author": "wxm",
|
|
7
7
|
"license": "MIT",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"diff": "^8.0.2",
|
|
62
62
|
"file-saver": "^2.0.5",
|
|
63
63
|
"lodash-es": "^4.17.22",
|
|
64
|
-
"modern-canvas": "^0.14.
|
|
64
|
+
"modern-canvas": "^0.14.29",
|
|
65
65
|
"modern-font": "^0.4.4",
|
|
66
66
|
"modern-idoc": "^0.10.8",
|
|
67
|
-
"modern-text": "^1.10.
|
|
68
|
-
"yjs": "^13.6.
|
|
67
|
+
"modern-text": "^1.10.13",
|
|
68
|
+
"yjs": "^13.6.29"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"lottie-web": "^5",
|