pxx-vue-quill 1.0.72 → 1.0.73
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/vue-quill.umd.js +37 -2
- package/dist/vue-quill.umd.prod.js +2 -2
- package/package.json +1 -1
package/dist/vue-quill.umd.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-09-
|
|
10
|
+
* Date: 2025-09-05T04:21:21.146Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -20179,6 +20179,7 @@
|
|
|
20179
20179
|
vue.onMounted(() => {
|
|
20180
20180
|
initialize();
|
|
20181
20181
|
document.addEventListener('click', handleGlobalClick);
|
|
20182
|
+
document.addEventListener('keyup', handleGlobalKeyup, true);
|
|
20182
20183
|
});
|
|
20183
20184
|
const removeQuillBlotFormatter = () => {
|
|
20184
20185
|
if (!props.enableImageResize)
|
|
@@ -20209,8 +20210,36 @@
|
|
|
20209
20210
|
removeQuillBlotFormatter();
|
|
20210
20211
|
}
|
|
20211
20212
|
};
|
|
20213
|
+
const handleGlobalKeyup = (event) => {
|
|
20214
|
+
if (!props.enableImageResize)
|
|
20215
|
+
return;
|
|
20216
|
+
if (event.keyCode !== 46 && event.keyCode !== 8)
|
|
20217
|
+
return;
|
|
20218
|
+
const blotFormatter = quill === null || quill === void 0 ? void 0 : quill.getModule('blotFormatter');
|
|
20219
|
+
if (!blotFormatter || !blotFormatter.currentSpec)
|
|
20220
|
+
return;
|
|
20221
|
+
const target = event.target;
|
|
20222
|
+
if (!editor.value || !editor.value.contains(target)) {
|
|
20223
|
+
event.stopImmediatePropagation();
|
|
20224
|
+
event.preventDefault();
|
|
20225
|
+
return;
|
|
20226
|
+
}
|
|
20227
|
+
const allEditors = document.querySelectorAll('.quill-editor-container');
|
|
20228
|
+
allEditors.forEach(editorElement => {
|
|
20229
|
+
if (editorElement !== editor.value) {
|
|
20230
|
+
const otherQuill = editorElement.__quill;
|
|
20231
|
+
if (otherQuill && otherQuill !== quill) {
|
|
20232
|
+
const otherBlotFormatter = otherQuill.getModule('blotFormatter');
|
|
20233
|
+
if (otherBlotFormatter && otherBlotFormatter.currentSpec) {
|
|
20234
|
+
otherBlotFormatter.hide();
|
|
20235
|
+
}
|
|
20236
|
+
}
|
|
20237
|
+
}
|
|
20238
|
+
});
|
|
20239
|
+
};
|
|
20212
20240
|
vue.onBeforeUnmount(() => {
|
|
20213
20241
|
document.removeEventListener('click', handleGlobalClick);
|
|
20242
|
+
document.removeEventListener('keyup', handleGlobalKeyup, true);
|
|
20214
20243
|
removeQuillBlotFormatter();
|
|
20215
20244
|
quill = null;
|
|
20216
20245
|
});
|
|
@@ -20333,7 +20362,13 @@
|
|
|
20333
20362
|
};
|
|
20334
20363
|
}
|
|
20335
20364
|
if (props.enableImageResize) {
|
|
20336
|
-
clientOptions.modules = Object.assign({}, clientOptions.modules, {
|
|
20365
|
+
clientOptions.modules = Object.assign({}, clientOptions.modules, {
|
|
20366
|
+
blotFormatter: {
|
|
20367
|
+
keyboard: {
|
|
20368
|
+
enabled: false
|
|
20369
|
+
}
|
|
20370
|
+
}
|
|
20371
|
+
});
|
|
20337
20372
|
}
|
|
20338
20373
|
return Object.assign({}, props.globalOptions, props.options, clientOptions);
|
|
20339
20374
|
};
|