pxx-vue-quill 1.0.127 → 1.0.129
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 +199 -214
- 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-10T08:10:26.296Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -18769,52 +18769,44 @@
|
|
|
18769
18769
|
|
|
18770
18770
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
|
|
18771
18771
|
|
|
18772
|
-
var Action = {};
|
|
18772
|
+
var Action$1 = {};
|
|
18773
18773
|
|
|
18774
|
-
|
|
18775
|
-
|
|
18776
|
-
|
|
18777
|
-
if (hasRequiredAction) return Action;
|
|
18778
|
-
hasRequiredAction = 1;
|
|
18779
|
-
|
|
18780
|
-
Object.defineProperty(Action, "__esModule", {
|
|
18781
|
-
value: true
|
|
18782
|
-
});
|
|
18774
|
+
Object.defineProperty(Action$1, "__esModule", {
|
|
18775
|
+
value: true
|
|
18776
|
+
});
|
|
18783
18777
|
|
|
18784
|
-
|
|
18778
|
+
var _createClass$1 = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
18785
18779
|
|
|
18786
|
-
|
|
18780
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
18787
18781
|
|
|
18788
|
-
|
|
18782
|
+
_interopRequireDefault(_BlotFormatter);
|
|
18789
18783
|
|
|
18790
|
-
|
|
18784
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18791
18785
|
|
|
18792
|
-
|
|
18786
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18793
18787
|
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18788
|
+
var Action = function () {
|
|
18789
|
+
function Action(formatter) {
|
|
18790
|
+
_classCallCheck$1(this, Action);
|
|
18797
18791
|
|
|
18798
|
-
|
|
18799
|
-
|
|
18792
|
+
this.formatter = formatter;
|
|
18793
|
+
}
|
|
18800
18794
|
|
|
18801
|
-
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18809
|
-
|
|
18810
|
-
|
|
18795
|
+
_createClass$1(Action, [{
|
|
18796
|
+
key: 'onCreate',
|
|
18797
|
+
value: function onCreate() {}
|
|
18798
|
+
}, {
|
|
18799
|
+
key: 'onDestroy',
|
|
18800
|
+
value: function onDestroy() {}
|
|
18801
|
+
}, {
|
|
18802
|
+
key: 'onUpdate',
|
|
18803
|
+
value: function onUpdate() {}
|
|
18804
|
+
}]);
|
|
18811
18805
|
|
|
18812
|
-
|
|
18813
|
-
|
|
18806
|
+
return Action;
|
|
18807
|
+
}();
|
|
18814
18808
|
|
|
18815
|
-
|
|
18816
|
-
return Action;
|
|
18817
|
-
}
|
|
18809
|
+
Action$1.default = Action;
|
|
18818
18810
|
|
|
18819
18811
|
var hasRequiredBlotFormatter;
|
|
18820
18812
|
|
|
@@ -18836,7 +18828,7 @@
|
|
|
18836
18828
|
|
|
18837
18829
|
var _Options2 = _interopRequireDefault(_Options);
|
|
18838
18830
|
|
|
18839
|
-
var _Action =
|
|
18831
|
+
var _Action = Action$1;
|
|
18840
18832
|
|
|
18841
18833
|
_interopRequireDefault(_Action);
|
|
18842
18834
|
|
|
@@ -18994,11 +18986,11 @@
|
|
|
18994
18986
|
value: true
|
|
18995
18987
|
});
|
|
18996
18988
|
|
|
18997
|
-
var _createClass
|
|
18989
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
18998
18990
|
|
|
18999
18991
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19000
18992
|
|
|
19001
|
-
function _classCallCheck
|
|
18993
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19002
18994
|
|
|
19003
18995
|
var LEFT_ALIGN = 'left';
|
|
19004
18996
|
var CENTER_ALIGN = 'center';
|
|
@@ -19009,7 +19001,7 @@
|
|
|
19009
19001
|
var _this = this,
|
|
19010
19002
|
_alignments;
|
|
19011
19003
|
|
|
19012
|
-
_classCallCheck
|
|
19004
|
+
_classCallCheck(this, DefaultAligner);
|
|
19013
19005
|
|
|
19014
19006
|
this.applyStyle = options.aligner.applyStyle;
|
|
19015
19007
|
this.alignAttribute = options.attribute;
|
|
@@ -19037,7 +19029,7 @@
|
|
|
19037
19029
|
}), _alignments);
|
|
19038
19030
|
}
|
|
19039
19031
|
|
|
19040
|
-
_createClass
|
|
19032
|
+
_createClass(DefaultAligner, [{
|
|
19041
19033
|
key: 'getAlignments',
|
|
19042
19034
|
value: function getAlignments() {
|
|
19043
19035
|
var _this2 = this;
|
|
@@ -19275,7 +19267,7 @@
|
|
|
19275
19267
|
|
|
19276
19268
|
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
19277
19269
|
|
|
19278
|
-
var _Action2 =
|
|
19270
|
+
var _Action2 = Action$1;
|
|
19279
19271
|
|
|
19280
19272
|
var _Action3 = _interopRequireDefault(_Action2);
|
|
19281
19273
|
|
|
@@ -19340,182 +19332,190 @@
|
|
|
19340
19332
|
return AlignAction;
|
|
19341
19333
|
}
|
|
19342
19334
|
|
|
19343
|
-
var ResizeAction
|
|
19335
|
+
var ResizeAction = {};
|
|
19344
19336
|
|
|
19345
|
-
|
|
19346
|
-
value: true
|
|
19347
|
-
});
|
|
19337
|
+
var hasRequiredResizeAction;
|
|
19348
19338
|
|
|
19349
|
-
|
|
19339
|
+
function requireResizeAction () {
|
|
19340
|
+
if (hasRequiredResizeAction) return ResizeAction;
|
|
19341
|
+
hasRequiredResizeAction = 1;
|
|
19350
19342
|
|
|
19351
|
-
|
|
19343
|
+
Object.defineProperty(ResizeAction, "__esModule", {
|
|
19344
|
+
value: true
|
|
19345
|
+
});
|
|
19352
19346
|
|
|
19353
|
-
|
|
19347
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
19354
19348
|
|
|
19355
|
-
|
|
19349
|
+
var _Action2 = Action$1;
|
|
19356
19350
|
|
|
19357
|
-
|
|
19351
|
+
var _Action3 = _interopRequireDefault(_Action2);
|
|
19358
19352
|
|
|
19359
|
-
|
|
19353
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19360
19354
|
|
|
19361
|
-
|
|
19355
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19362
19356
|
|
|
19363
|
-
|
|
19357
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19364
19358
|
|
|
19365
|
-
|
|
19359
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19366
19360
|
|
|
19367
|
-
|
|
19368
|
-
_inherits(ResizeAction, _Action);
|
|
19361
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
19369
19362
|
|
|
19370
|
-
|
|
19371
|
-
_classCallCheck(this, ResizeAction);
|
|
19363
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
19372
19364
|
|
|
19373
|
-
|
|
19365
|
+
var ResizeAction$1 = function (_Action) {
|
|
19366
|
+
_inherits(ResizeAction, _Action);
|
|
19374
19367
|
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
return;
|
|
19378
|
-
}
|
|
19379
|
-
_this.dragHandle = event.target;
|
|
19380
|
-
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19368
|
+
function ResizeAction(formatter) {
|
|
19369
|
+
_classCallCheck(this, ResizeAction);
|
|
19381
19370
|
|
|
19382
|
-
|
|
19383
|
-
return;
|
|
19384
|
-
}
|
|
19371
|
+
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19385
19372
|
|
|
19386
|
-
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19373
|
+
_this.onMouseDown = function (event) {
|
|
19374
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
19375
|
+
return;
|
|
19376
|
+
}
|
|
19377
|
+
_this.dragHandle = event.target;
|
|
19378
|
+
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19390
19379
|
|
|
19391
|
-
|
|
19380
|
+
if (!_this.formatter.currentSpec) {
|
|
19381
|
+
return;
|
|
19382
|
+
}
|
|
19392
19383
|
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19384
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19385
|
+
if (!target) {
|
|
19386
|
+
return;
|
|
19387
|
+
}
|
|
19396
19388
|
|
|
19397
|
-
|
|
19398
|
-
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19399
|
-
};
|
|
19389
|
+
var rect = target.getBoundingClientRect();
|
|
19400
19390
|
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
}
|
|
19391
|
+
_this.dragStartX = event.clientX;
|
|
19392
|
+
_this.preDragWidth = rect.width;
|
|
19393
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19405
19394
|
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
}
|
|
19395
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19396
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19397
|
+
};
|
|
19410
19398
|
|
|
19411
|
-
|
|
19412
|
-
|
|
19399
|
+
_this.onDrag = function (event) {
|
|
19400
|
+
if (!_this.formatter.currentSpec) {
|
|
19401
|
+
return;
|
|
19402
|
+
}
|
|
19413
19403
|
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
}
|
|
19404
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19405
|
+
if (!target) {
|
|
19406
|
+
return;
|
|
19407
|
+
}
|
|
19419
19408
|
|
|
19420
|
-
|
|
19409
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19410
|
+
var newWidth = 0;
|
|
19421
19411
|
|
|
19422
|
-
|
|
19423
|
-
|
|
19412
|
+
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19413
|
+
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19414
|
+
} else {
|
|
19415
|
+
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19416
|
+
}
|
|
19424
19417
|
|
|
19425
|
-
|
|
19426
|
-
};
|
|
19418
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19427
19419
|
|
|
19428
|
-
|
|
19429
|
-
|
|
19430
|
-
document.removeEventListener('mousemove', _this.onDrag);
|
|
19431
|
-
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19432
|
-
};
|
|
19420
|
+
target.setAttribute('width', '' + newWidth);
|
|
19421
|
+
target.setAttribute('height', '' + newHeight);
|
|
19433
19422
|
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19437
|
-
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19438
|
-
_this.dragHandle = null;
|
|
19439
|
-
_this.dragStartX = 0;
|
|
19440
|
-
_this.preDragWidth = 0;
|
|
19441
|
-
_this.targetRatio = 0;
|
|
19442
|
-
return _this;
|
|
19443
|
-
}
|
|
19423
|
+
_this.formatter.update();
|
|
19424
|
+
};
|
|
19444
19425
|
|
|
19445
|
-
|
|
19446
|
-
|
|
19447
|
-
|
|
19448
|
-
|
|
19449
|
-
|
|
19450
|
-
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19451
|
-
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19426
|
+
_this.onMouseUp = function () {
|
|
19427
|
+
_this.setCursor('');
|
|
19428
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19429
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19430
|
+
};
|
|
19452
19431
|
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
|
|
19458
|
-
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
}
|
|
19464
|
-
}, {
|
|
19465
|
-
key: 'createHandle',
|
|
19466
|
-
value: function createHandle(position, cursor) {
|
|
19467
|
-
var box = document.createElement('div');
|
|
19468
|
-
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19469
|
-
box.setAttribute('data-position', position);
|
|
19470
|
-
box.style.cursor = cursor;
|
|
19471
|
-
|
|
19472
|
-
if (this.formatter.options.resize.handleStyle) {
|
|
19473
|
-
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19474
|
-
}
|
|
19432
|
+
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19433
|
+
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
19434
|
+
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19435
|
+
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19436
|
+
_this.dragHandle = null;
|
|
19437
|
+
_this.dragStartX = 0;
|
|
19438
|
+
_this.preDragWidth = 0;
|
|
19439
|
+
_this.targetRatio = 0;
|
|
19440
|
+
return _this;
|
|
19441
|
+
}
|
|
19475
19442
|
|
|
19476
|
-
|
|
19443
|
+
_createClass(ResizeAction, [{
|
|
19444
|
+
key: 'onCreate',
|
|
19445
|
+
value: function onCreate() {
|
|
19446
|
+
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19447
|
+
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19448
|
+
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19449
|
+
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19477
19450
|
|
|
19478
|
-
|
|
19479
|
-
|
|
19480
|
-
|
|
19481
|
-
|
|
19482
|
-
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19451
|
+
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19452
|
+
}
|
|
19453
|
+
}, {
|
|
19454
|
+
key: 'onDestroy',
|
|
19455
|
+
value: function onDestroy() {
|
|
19456
|
+
this.setCursor('');
|
|
19457
|
+
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19458
|
+
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19459
|
+
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19460
|
+
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19461
|
+
}
|
|
19462
|
+
}, {
|
|
19463
|
+
key: 'createHandle',
|
|
19464
|
+
value: function createHandle(position, cursor) {
|
|
19465
|
+
var box = document.createElement('div');
|
|
19466
|
+
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19467
|
+
box.setAttribute('data-position', position);
|
|
19468
|
+
box.style.cursor = cursor;
|
|
19469
|
+
|
|
19470
|
+
if (this.formatter.options.resize.handleStyle) {
|
|
19471
|
+
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19472
|
+
}
|
|
19493
19473
|
|
|
19494
|
-
|
|
19495
|
-
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19496
|
-
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19497
|
-
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19498
|
-
}
|
|
19499
|
-
}, {
|
|
19500
|
-
key: 'setCursor',
|
|
19501
|
-
value: function setCursor(value) {
|
|
19502
|
-
if (document.body) {
|
|
19503
|
-
document.body.style.cursor = value;
|
|
19504
|
-
}
|
|
19474
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19505
19475
|
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
|
|
19509
|
-
|
|
19510
|
-
|
|
19511
|
-
|
|
19512
|
-
|
|
19513
|
-
|
|
19476
|
+
return box;
|
|
19477
|
+
}
|
|
19478
|
+
}, {
|
|
19479
|
+
key: 'repositionHandles',
|
|
19480
|
+
value: function repositionHandles(handleStyle) {
|
|
19481
|
+
var handleXOffset = '0px';
|
|
19482
|
+
var handleYOffset = '0px';
|
|
19483
|
+
if (handleStyle) {
|
|
19484
|
+
if (handleStyle.width) {
|
|
19485
|
+
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19486
|
+
}
|
|
19487
|
+
if (handleStyle.height) {
|
|
19488
|
+
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19489
|
+
}
|
|
19490
|
+
}
|
|
19491
|
+
|
|
19492
|
+
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
19493
|
+
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19494
|
+
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19495
|
+
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19496
|
+
}
|
|
19497
|
+
}, {
|
|
19498
|
+
key: 'setCursor',
|
|
19499
|
+
value: function setCursor(value) {
|
|
19500
|
+
if (document.body) {
|
|
19501
|
+
document.body.style.cursor = value;
|
|
19502
|
+
}
|
|
19503
|
+
|
|
19504
|
+
if (this.formatter.currentSpec) {
|
|
19505
|
+
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19506
|
+
if (target) {
|
|
19507
|
+
target.style.cursor = value;
|
|
19508
|
+
}
|
|
19509
|
+
}
|
|
19510
|
+
}
|
|
19511
|
+
}]);
|
|
19514
19512
|
|
|
19515
|
-
|
|
19516
|
-
|
|
19513
|
+
return ResizeAction;
|
|
19514
|
+
}(_Action3.default);
|
|
19517
19515
|
|
|
19518
|
-
|
|
19516
|
+
ResizeAction.default = ResizeAction$1;
|
|
19517
|
+
return ResizeAction;
|
|
19518
|
+
}
|
|
19519
19519
|
|
|
19520
19520
|
var DeleteAction = {};
|
|
19521
19521
|
|
|
@@ -19535,7 +19535,7 @@
|
|
|
19535
19535
|
|
|
19536
19536
|
var _quill2 = _interopRequireDefault(_quill);
|
|
19537
19537
|
|
|
19538
|
-
var _Action2 =
|
|
19538
|
+
var _Action2 = Action$1;
|
|
19539
19539
|
|
|
19540
19540
|
var _Action3 = _interopRequireDefault(_Action2);
|
|
19541
19541
|
|
|
@@ -19614,7 +19614,7 @@
|
|
|
19614
19614
|
|
|
19615
19615
|
_interopRequireDefault(_BlotFormatter);
|
|
19616
19616
|
|
|
19617
|
-
var _Action =
|
|
19617
|
+
var _Action = Action$1;
|
|
19618
19618
|
|
|
19619
19619
|
_interopRequireDefault(_Action);
|
|
19620
19620
|
|
|
@@ -19622,7 +19622,7 @@
|
|
|
19622
19622
|
|
|
19623
19623
|
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19624
19624
|
|
|
19625
|
-
var _ResizeAction =
|
|
19625
|
+
var _ResizeAction = requireResizeAction();
|
|
19626
19626
|
|
|
19627
19627
|
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19628
19628
|
|
|
@@ -20070,7 +20070,7 @@
|
|
|
20070
20070
|
}
|
|
20071
20071
|
});
|
|
20072
20072
|
|
|
20073
|
-
var _Action =
|
|
20073
|
+
var _Action = Action$1;
|
|
20074
20074
|
|
|
20075
20075
|
Object.defineProperty(exports, 'Action', {
|
|
20076
20076
|
enumerable: true,
|
|
@@ -20115,7 +20115,7 @@
|
|
|
20115
20115
|
}
|
|
20116
20116
|
});
|
|
20117
20117
|
|
|
20118
|
-
var _ResizeAction =
|
|
20118
|
+
var _ResizeAction = requireResizeAction();
|
|
20119
20119
|
|
|
20120
20120
|
Object.defineProperty(exports, 'ResizeAction', {
|
|
20121
20121
|
enumerable: true,
|
|
@@ -20237,27 +20237,16 @@
|
|
|
20237
20237
|
}
|
|
20238
20238
|
};
|
|
20239
20239
|
const registerBlotFormatter = () => {
|
|
20240
|
-
var _a;
|
|
20241
20240
|
if (!enableImageResize) {
|
|
20242
20241
|
return;
|
|
20243
20242
|
}
|
|
20244
20243
|
try {
|
|
20245
|
-
|
|
20246
|
-
Quill.register('modules/blotFormatter', BlotFormatter);
|
|
20247
|
-
}
|
|
20244
|
+
Quill.register('modules/blotFormatter', BlotFormatter);
|
|
20248
20245
|
}
|
|
20249
20246
|
catch (error) {
|
|
20250
20247
|
console.warn('注册BlotFormatter模块时出错:', error);
|
|
20251
20248
|
}
|
|
20252
20249
|
};
|
|
20253
|
-
const getBlotFormatterConfig = () => {
|
|
20254
|
-
if (!enableImageResize) {
|
|
20255
|
-
return {};
|
|
20256
|
-
}
|
|
20257
|
-
return {
|
|
20258
|
-
blotFormatter: {}
|
|
20259
|
-
};
|
|
20260
|
-
};
|
|
20261
20250
|
vue.onBeforeUnmount(() => {
|
|
20262
20251
|
removeQuillBlotFormatter();
|
|
20263
20252
|
});
|
|
@@ -20270,8 +20259,7 @@
|
|
|
20270
20259
|
handleBlotFormatterClick,
|
|
20271
20260
|
configureBlotFormatter,
|
|
20272
20261
|
applyImageStyle,
|
|
20273
|
-
registerBlotFormatter
|
|
20274
|
-
getBlotFormatterConfig
|
|
20262
|
+
registerBlotFormatter
|
|
20275
20263
|
};
|
|
20276
20264
|
}
|
|
20277
20265
|
|
|
@@ -20355,10 +20343,12 @@
|
|
|
20355
20343
|
clickHandlers.value = [];
|
|
20356
20344
|
};
|
|
20357
20345
|
vue.onMounted(() => {
|
|
20358
|
-
|
|
20346
|
+
var _a;
|
|
20347
|
+
(_a = document.getElementById("#questionDrawer")) === null || _a === void 0 ? void 0 : _a.addEventListener('click', handleGlobalClick, true);
|
|
20359
20348
|
});
|
|
20360
20349
|
vue.onBeforeUnmount(() => {
|
|
20361
|
-
|
|
20350
|
+
var _a;
|
|
20351
|
+
(_a = document.getElementById("#questionDrawer")) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', handleGlobalClick, true);
|
|
20362
20352
|
clearClickHandlers();
|
|
20363
20353
|
});
|
|
20364
20354
|
return {
|
|
@@ -20468,7 +20458,7 @@
|
|
|
20468
20458
|
const linkPosition = vue.ref({ top: 0, left: 0 });
|
|
20469
20459
|
const savedRange = vue.ref(null);
|
|
20470
20460
|
const { addClickHandler } = useGlobalClick();
|
|
20471
|
-
const { setQuill, handleBlotFormatterClick, configureBlotFormatter, applyImageStyle, registerBlotFormatter,
|
|
20461
|
+
const { setQuill, handleBlotFormatterClick, configureBlotFormatter, applyImageStyle, registerBlotFormatter, } = useBlotFormatter(editor, props.enableImageResize);
|
|
20472
20462
|
const { setQuill: setLinkQuill, setHandleCustomLink, addLinkClickListener } = useLinkClick(editor);
|
|
20473
20463
|
vue.onMounted(() => {
|
|
20474
20464
|
initialize();
|
|
@@ -20655,6 +20645,9 @@
|
|
|
20655
20645
|
clientOptions.modules = {
|
|
20656
20646
|
toolbar: "#toolbar-" + props.editorKey,
|
|
20657
20647
|
};
|
|
20648
|
+
if (props.enableImageResize) {
|
|
20649
|
+
clientOptions.modules.blotFormatter = {};
|
|
20650
|
+
}
|
|
20658
20651
|
}
|
|
20659
20652
|
else {
|
|
20660
20653
|
clientOptions.modules = {
|
|
@@ -20692,16 +20685,8 @@
|
|
|
20692
20685
|
},
|
|
20693
20686
|
},
|
|
20694
20687
|
};
|
|
20695
|
-
|
|
20696
|
-
|
|
20697
|
-
const blotFormatterConfig = getBlotFormatterConfig();
|
|
20698
|
-
if (Object.keys(blotFormatterConfig).length > 0) {
|
|
20699
|
-
clientOptions.modules = Object.assign({}, clientOptions.modules, blotFormatterConfig);
|
|
20700
|
-
}
|
|
20701
|
-
}
|
|
20702
|
-
else {
|
|
20703
|
-
if (clientOptions.modules) {
|
|
20704
|
-
delete clientOptions.modules.blotFormatter;
|
|
20688
|
+
if (props.enableImageResize) {
|
|
20689
|
+
clientOptions.modules.blotFormatter = {};
|
|
20705
20690
|
}
|
|
20706
20691
|
}
|
|
20707
20692
|
return Object.assign({}, props.globalOptions, props.options, clientOptions);
|