pxx-vue-quill 1.0.102 → 1.0.104
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 +274 -284
- 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-10T02:
|
|
10
|
+
* Date: 2025-09-10T02:22:02.488Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -19339,190 +19339,182 @@
|
|
|
19339
19339
|
return AlignAction;
|
|
19340
19340
|
}
|
|
19341
19341
|
|
|
19342
|
-
var ResizeAction = {};
|
|
19342
|
+
var ResizeAction$1 = {};
|
|
19343
19343
|
|
|
19344
|
-
|
|
19344
|
+
Object.defineProperty(ResizeAction$1, "__esModule", {
|
|
19345
|
+
value: true
|
|
19346
|
+
});
|
|
19345
19347
|
|
|
19346
|
-
function
|
|
19347
|
-
if (hasRequiredResizeAction) return ResizeAction;
|
|
19348
|
-
hasRequiredResizeAction = 1;
|
|
19348
|
+
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; }; }();
|
|
19349
19349
|
|
|
19350
|
-
|
|
19351
|
-
value: true
|
|
19352
|
-
});
|
|
19350
|
+
var _Action2 = requireAction();
|
|
19353
19351
|
|
|
19354
|
-
|
|
19352
|
+
var _Action3 = _interopRequireDefault(_Action2);
|
|
19355
19353
|
|
|
19356
|
-
|
|
19357
|
-
|
|
19358
|
-
var _Action3 = _interopRequireDefault(_Action2);
|
|
19354
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19359
19355
|
|
|
19360
|
-
|
|
19356
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19361
19357
|
|
|
19362
|
-
|
|
19358
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19363
19359
|
|
|
19364
|
-
|
|
19360
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19365
19361
|
|
|
19366
|
-
|
|
19362
|
+
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; }
|
|
19367
19363
|
|
|
19368
|
-
|
|
19364
|
+
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; }
|
|
19369
19365
|
|
|
19370
|
-
|
|
19366
|
+
var ResizeAction = function (_Action) {
|
|
19367
|
+
_inherits(ResizeAction, _Action);
|
|
19371
19368
|
|
|
19372
|
-
|
|
19373
|
-
|
|
19369
|
+
function ResizeAction(formatter) {
|
|
19370
|
+
_classCallCheck(this, ResizeAction);
|
|
19374
19371
|
|
|
19375
|
-
|
|
19376
|
-
_classCallCheck(this, ResizeAction);
|
|
19372
|
+
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19377
19373
|
|
|
19378
|
-
|
|
19374
|
+
_this.onMouseDown = function (event) {
|
|
19375
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
19376
|
+
return;
|
|
19377
|
+
}
|
|
19378
|
+
_this.dragHandle = event.target;
|
|
19379
|
+
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19379
19380
|
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
}
|
|
19384
|
-
_this.dragHandle = event.target;
|
|
19385
|
-
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19381
|
+
if (!_this.formatter.currentSpec) {
|
|
19382
|
+
return;
|
|
19383
|
+
}
|
|
19386
19384
|
|
|
19387
|
-
|
|
19388
|
-
|
|
19389
|
-
|
|
19385
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19386
|
+
if (!target) {
|
|
19387
|
+
return;
|
|
19388
|
+
}
|
|
19390
19389
|
|
|
19391
|
-
|
|
19392
|
-
if (!target) {
|
|
19393
|
-
return;
|
|
19394
|
-
}
|
|
19390
|
+
var rect = target.getBoundingClientRect();
|
|
19395
19391
|
|
|
19396
|
-
|
|
19392
|
+
_this.dragStartX = event.clientX;
|
|
19393
|
+
_this.preDragWidth = rect.width;
|
|
19394
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19397
19395
|
|
|
19398
|
-
|
|
19399
|
-
|
|
19400
|
-
|
|
19396
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19397
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19398
|
+
};
|
|
19401
19399
|
|
|
19402
|
-
|
|
19403
|
-
|
|
19404
|
-
|
|
19400
|
+
_this.onDrag = function (event) {
|
|
19401
|
+
if (!_this.formatter.currentSpec) {
|
|
19402
|
+
return;
|
|
19403
|
+
}
|
|
19405
19404
|
|
|
19406
|
-
|
|
19407
|
-
|
|
19408
|
-
|
|
19409
|
-
|
|
19405
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19406
|
+
if (!target) {
|
|
19407
|
+
return;
|
|
19408
|
+
}
|
|
19410
19409
|
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
return;
|
|
19414
|
-
}
|
|
19410
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19411
|
+
var newWidth = 0;
|
|
19415
19412
|
|
|
19416
|
-
|
|
19417
|
-
|
|
19413
|
+
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19414
|
+
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19415
|
+
} else {
|
|
19416
|
+
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19417
|
+
}
|
|
19418
19418
|
|
|
19419
|
-
|
|
19420
|
-
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19421
|
-
} else {
|
|
19422
|
-
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19423
|
-
}
|
|
19419
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19424
19420
|
|
|
19425
|
-
|
|
19421
|
+
target.setAttribute('width', '' + newWidth);
|
|
19422
|
+
target.setAttribute('height', '' + newHeight);
|
|
19426
19423
|
|
|
19427
|
-
|
|
19428
|
-
|
|
19424
|
+
_this.formatter.update();
|
|
19425
|
+
};
|
|
19429
19426
|
|
|
19430
|
-
|
|
19431
|
-
|
|
19427
|
+
_this.onMouseUp = function () {
|
|
19428
|
+
_this.setCursor('');
|
|
19429
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19430
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19431
|
+
};
|
|
19432
19432
|
|
|
19433
|
-
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19433
|
+
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19434
|
+
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
19435
|
+
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19436
|
+
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19437
|
+
_this.dragHandle = null;
|
|
19438
|
+
_this.dragStartX = 0;
|
|
19439
|
+
_this.preDragWidth = 0;
|
|
19440
|
+
_this.targetRatio = 0;
|
|
19441
|
+
return _this;
|
|
19442
|
+
}
|
|
19438
19443
|
|
|
19439
|
-
|
|
19440
|
-
|
|
19441
|
-
|
|
19442
|
-
|
|
19443
|
-
|
|
19444
|
-
|
|
19445
|
-
|
|
19446
|
-
_this.targetRatio = 0;
|
|
19447
|
-
return _this;
|
|
19448
|
-
}
|
|
19444
|
+
_createClass(ResizeAction, [{
|
|
19445
|
+
key: 'onCreate',
|
|
19446
|
+
value: function onCreate() {
|
|
19447
|
+
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19448
|
+
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19449
|
+
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19450
|
+
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19449
19451
|
|
|
19450
|
-
|
|
19451
|
-
|
|
19452
|
-
|
|
19453
|
-
|
|
19454
|
-
|
|
19455
|
-
|
|
19456
|
-
|
|
19452
|
+
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19453
|
+
}
|
|
19454
|
+
}, {
|
|
19455
|
+
key: 'onDestroy',
|
|
19456
|
+
value: function onDestroy() {
|
|
19457
|
+
this.setCursor('');
|
|
19458
|
+
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19459
|
+
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19460
|
+
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19461
|
+
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19462
|
+
}
|
|
19463
|
+
}, {
|
|
19464
|
+
key: 'createHandle',
|
|
19465
|
+
value: function createHandle(position, cursor) {
|
|
19466
|
+
var box = document.createElement('div');
|
|
19467
|
+
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19468
|
+
box.setAttribute('data-position', position);
|
|
19469
|
+
box.style.cursor = cursor;
|
|
19470
|
+
|
|
19471
|
+
if (this.formatter.options.resize.handleStyle) {
|
|
19472
|
+
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19473
|
+
}
|
|
19457
19474
|
|
|
19458
|
-
|
|
19459
|
-
}
|
|
19460
|
-
}, {
|
|
19461
|
-
key: 'onDestroy',
|
|
19462
|
-
value: function onDestroy() {
|
|
19463
|
-
this.setCursor('');
|
|
19464
|
-
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19465
|
-
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19466
|
-
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19467
|
-
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19468
|
-
}
|
|
19469
|
-
}, {
|
|
19470
|
-
key: 'createHandle',
|
|
19471
|
-
value: function createHandle(position, cursor) {
|
|
19472
|
-
var box = document.createElement('div');
|
|
19473
|
-
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19474
|
-
box.setAttribute('data-position', position);
|
|
19475
|
-
box.style.cursor = cursor;
|
|
19476
|
-
|
|
19477
|
-
if (this.formatter.options.resize.handleStyle) {
|
|
19478
|
-
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19479
|
-
}
|
|
19475
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19480
19476
|
|
|
19481
|
-
|
|
19477
|
+
return box;
|
|
19478
|
+
}
|
|
19479
|
+
}, {
|
|
19480
|
+
key: 'repositionHandles',
|
|
19481
|
+
value: function repositionHandles(handleStyle) {
|
|
19482
|
+
var handleXOffset = '0px';
|
|
19483
|
+
var handleYOffset = '0px';
|
|
19484
|
+
if (handleStyle) {
|
|
19485
|
+
if (handleStyle.width) {
|
|
19486
|
+
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19487
|
+
}
|
|
19488
|
+
if (handleStyle.height) {
|
|
19489
|
+
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19490
|
+
}
|
|
19491
|
+
}
|
|
19482
19492
|
|
|
19483
|
-
|
|
19484
|
-
|
|
19485
|
-
|
|
19486
|
-
|
|
19487
|
-
|
|
19488
|
-
|
|
19489
|
-
|
|
19490
|
-
|
|
19491
|
-
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
if (handleStyle.height) {
|
|
19495
|
-
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19496
|
-
}
|
|
19497
|
-
}
|
|
19493
|
+
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
19494
|
+
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19495
|
+
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19496
|
+
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19497
|
+
}
|
|
19498
|
+
}, {
|
|
19499
|
+
key: 'setCursor',
|
|
19500
|
+
value: function setCursor(value) {
|
|
19501
|
+
if (document.body) {
|
|
19502
|
+
document.body.style.cursor = value;
|
|
19503
|
+
}
|
|
19498
19504
|
|
|
19499
|
-
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
if (document.body) {
|
|
19508
|
-
document.body.style.cursor = value;
|
|
19509
|
-
}
|
|
19505
|
+
if (this.formatter.currentSpec) {
|
|
19506
|
+
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19507
|
+
if (target) {
|
|
19508
|
+
target.style.cursor = value;
|
|
19509
|
+
}
|
|
19510
|
+
}
|
|
19511
|
+
}
|
|
19512
|
+
}]);
|
|
19510
19513
|
|
|
19511
|
-
|
|
19512
|
-
|
|
19513
|
-
if (target) {
|
|
19514
|
-
target.style.cursor = value;
|
|
19515
|
-
}
|
|
19516
|
-
}
|
|
19517
|
-
}
|
|
19518
|
-
}]);
|
|
19514
|
+
return ResizeAction;
|
|
19515
|
+
}(_Action3.default);
|
|
19519
19516
|
|
|
19520
|
-
|
|
19521
|
-
}(_Action3.default);
|
|
19522
|
-
|
|
19523
|
-
ResizeAction.default = ResizeAction$1;
|
|
19524
|
-
return ResizeAction;
|
|
19525
|
-
}
|
|
19517
|
+
ResizeAction$1.default = ResizeAction;
|
|
19526
19518
|
|
|
19527
19519
|
var DeleteAction = {};
|
|
19528
19520
|
|
|
@@ -19629,7 +19621,7 @@
|
|
|
19629
19621
|
|
|
19630
19622
|
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19631
19623
|
|
|
19632
|
-
var _ResizeAction =
|
|
19624
|
+
var _ResizeAction = ResizeAction$1;
|
|
19633
19625
|
|
|
19634
19626
|
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19635
19627
|
|
|
@@ -19761,148 +19753,156 @@
|
|
|
19761
19753
|
|
|
19762
19754
|
var IframeVideoSpec = {};
|
|
19763
19755
|
|
|
19764
|
-
var UnclickableBlotSpec
|
|
19756
|
+
var UnclickableBlotSpec = {};
|
|
19765
19757
|
|
|
19766
|
-
|
|
19767
|
-
value: true
|
|
19768
|
-
});
|
|
19758
|
+
var hasRequiredUnclickableBlotSpec;
|
|
19769
19759
|
|
|
19770
|
-
|
|
19760
|
+
function requireUnclickableBlotSpec () {
|
|
19761
|
+
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19762
|
+
hasRequiredUnclickableBlotSpec = 1;
|
|
19771
19763
|
|
|
19772
|
-
|
|
19764
|
+
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19765
|
+
value: true
|
|
19766
|
+
});
|
|
19773
19767
|
|
|
19774
|
-
|
|
19768
|
+
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; }; }();
|
|
19775
19769
|
|
|
19776
|
-
|
|
19770
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19777
19771
|
|
|
19778
|
-
|
|
19772
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19779
19773
|
|
|
19780
|
-
|
|
19774
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19781
19775
|
|
|
19782
|
-
|
|
19776
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19783
19777
|
|
|
19784
|
-
|
|
19778
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19785
19779
|
|
|
19786
|
-
|
|
19780
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19787
19781
|
|
|
19788
|
-
|
|
19789
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19782
|
+
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; }
|
|
19790
19783
|
|
|
19791
|
-
|
|
19792
|
-
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19784
|
+
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; }
|
|
19793
19785
|
|
|
19794
|
-
|
|
19795
|
-
|
|
19786
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19787
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19796
19788
|
|
|
19797
|
-
|
|
19789
|
+
var UnclickableBlotSpec$1 = function (_BlotSpec) {
|
|
19790
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19798
19791
|
|
|
19799
|
-
|
|
19800
|
-
|
|
19801
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19802
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19803
|
-
});
|
|
19804
|
-
};
|
|
19792
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19793
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19805
19794
|
|
|
19806
|
-
|
|
19807
|
-
var unclickable = event.target;
|
|
19808
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19809
|
-
return;
|
|
19810
|
-
}
|
|
19795
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19811
19796
|
|
|
19812
|
-
|
|
19813
|
-
|
|
19814
|
-
|
|
19797
|
+
_this.onTextChange = function () {
|
|
19798
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19799
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19800
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19801
|
+
});
|
|
19802
|
+
};
|
|
19815
19803
|
|
|
19816
|
-
|
|
19817
|
-
|
|
19818
|
-
|
|
19819
|
-
|
|
19820
|
-
|
|
19821
|
-
};
|
|
19804
|
+
_this.onMouseEnter = function (event) {
|
|
19805
|
+
var unclickable = event.target;
|
|
19806
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19807
|
+
return;
|
|
19808
|
+
}
|
|
19822
19809
|
|
|
19823
|
-
|
|
19824
|
-
|
|
19825
|
-
|
|
19826
|
-
return _this;
|
|
19827
|
-
}
|
|
19810
|
+
_this.nextUnclickable = unclickable;
|
|
19811
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19812
|
+
};
|
|
19828
19813
|
|
|
19829
|
-
|
|
19830
|
-
|
|
19831
|
-
|
|
19832
|
-
|
|
19833
|
-
|
|
19834
|
-
|
|
19835
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19836
|
-
*/
|
|
19837
|
-
document.body.appendChild(this.createProxyImage());
|
|
19838
|
-
}
|
|
19814
|
+
_this.onProxyImageClick = function () {
|
|
19815
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19816
|
+
_this.nextUnclickable = null;
|
|
19817
|
+
_this.formatter.show(_this);
|
|
19818
|
+
_this.hideProxyImage();
|
|
19819
|
+
};
|
|
19839
19820
|
|
|
19840
|
-
|
|
19841
|
-
|
|
19842
|
-
|
|
19843
|
-
|
|
19844
|
-
|
|
19845
|
-
key: 'getTargetElement',
|
|
19846
|
-
value: function getTargetElement() {
|
|
19847
|
-
return this.unclickable;
|
|
19848
|
-
}
|
|
19849
|
-
}, {
|
|
19850
|
-
key: 'getOverlayElement',
|
|
19851
|
-
value: function getOverlayElement() {
|
|
19852
|
-
return this.unclickable;
|
|
19853
|
-
}
|
|
19854
|
-
}, {
|
|
19855
|
-
key: 'onHide',
|
|
19856
|
-
value: function onHide() {
|
|
19857
|
-
this.hideProxyImage();
|
|
19858
|
-
this.nextUnclickable = null;
|
|
19859
|
-
this.unclickable = null;
|
|
19860
|
-
}
|
|
19861
|
-
}, {
|
|
19862
|
-
key: 'createProxyImage',
|
|
19863
|
-
value: function createProxyImage() {
|
|
19864
|
-
var canvas = document.createElement('canvas');
|
|
19865
|
-
var context = canvas.getContext('2d');
|
|
19866
|
-
context.globalAlpha = 0;
|
|
19867
|
-
context.fillRect(0, 0, 1, 1);
|
|
19868
|
-
|
|
19869
|
-
this.proxyImage = document.createElement('img');
|
|
19870
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19871
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19872
|
-
|
|
19873
|
-
Object.assign(this.proxyImage.style, {
|
|
19874
|
-
position: 'absolute',
|
|
19875
|
-
margin: '0'
|
|
19876
|
-
});
|
|
19821
|
+
_this.selector = selector;
|
|
19822
|
+
_this.unclickable = null;
|
|
19823
|
+
_this.nextUnclickable = null;
|
|
19824
|
+
return _this;
|
|
19825
|
+
}
|
|
19877
19826
|
|
|
19878
|
-
|
|
19879
|
-
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
key: 'repositionProxyImage',
|
|
19889
|
-
value: function repositionProxyImage(unclickable) {
|
|
19890
|
-
var rect = unclickable.getBoundingClientRect();
|
|
19891
|
-
|
|
19892
|
-
Object.assign(this.proxyImage.style, {
|
|
19893
|
-
display: 'block',
|
|
19894
|
-
left: rect.left + window.pageXOffset + 'px',
|
|
19895
|
-
top: rect.top + window.pageYOffset + 'px',
|
|
19896
|
-
width: rect.width + 'px',
|
|
19897
|
-
height: rect.height + 'px'
|
|
19898
|
-
});
|
|
19899
|
-
}
|
|
19900
|
-
}]);
|
|
19827
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19828
|
+
key: 'init',
|
|
19829
|
+
value: function init() {
|
|
19830
|
+
if (document.body) {
|
|
19831
|
+
/*
|
|
19832
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19833
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19834
|
+
*/
|
|
19835
|
+
document.body.appendChild(this.createProxyImage());
|
|
19836
|
+
}
|
|
19901
19837
|
|
|
19902
|
-
|
|
19903
|
-
|
|
19838
|
+
this.hideProxyImage();
|
|
19839
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19840
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19841
|
+
}
|
|
19842
|
+
}, {
|
|
19843
|
+
key: 'getTargetElement',
|
|
19844
|
+
value: function getTargetElement() {
|
|
19845
|
+
return this.unclickable;
|
|
19846
|
+
}
|
|
19847
|
+
}, {
|
|
19848
|
+
key: 'getOverlayElement',
|
|
19849
|
+
value: function getOverlayElement() {
|
|
19850
|
+
return this.unclickable;
|
|
19851
|
+
}
|
|
19852
|
+
}, {
|
|
19853
|
+
key: 'onHide',
|
|
19854
|
+
value: function onHide() {
|
|
19855
|
+
this.hideProxyImage();
|
|
19856
|
+
this.nextUnclickable = null;
|
|
19857
|
+
this.unclickable = null;
|
|
19858
|
+
}
|
|
19859
|
+
}, {
|
|
19860
|
+
key: 'createProxyImage',
|
|
19861
|
+
value: function createProxyImage() {
|
|
19862
|
+
var canvas = document.createElement('canvas');
|
|
19863
|
+
var context = canvas.getContext('2d');
|
|
19864
|
+
context.globalAlpha = 0;
|
|
19865
|
+
context.fillRect(0, 0, 1, 1);
|
|
19866
|
+
|
|
19867
|
+
this.proxyImage = document.createElement('img');
|
|
19868
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19869
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19870
|
+
|
|
19871
|
+
Object.assign(this.proxyImage.style, {
|
|
19872
|
+
position: 'absolute',
|
|
19873
|
+
margin: '0'
|
|
19874
|
+
});
|
|
19875
|
+
|
|
19876
|
+
return this.proxyImage;
|
|
19877
|
+
}
|
|
19878
|
+
}, {
|
|
19879
|
+
key: 'hideProxyImage',
|
|
19880
|
+
value: function hideProxyImage() {
|
|
19881
|
+
Object.assign(this.proxyImage.style, {
|
|
19882
|
+
display: 'none'
|
|
19883
|
+
});
|
|
19884
|
+
}
|
|
19885
|
+
}, {
|
|
19886
|
+
key: 'repositionProxyImage',
|
|
19887
|
+
value: function repositionProxyImage(unclickable) {
|
|
19888
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19889
|
+
|
|
19890
|
+
Object.assign(this.proxyImage.style, {
|
|
19891
|
+
display: 'block',
|
|
19892
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19893
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19894
|
+
width: rect.width + 'px',
|
|
19895
|
+
height: rect.height + 'px'
|
|
19896
|
+
});
|
|
19897
|
+
}
|
|
19898
|
+
}]);
|
|
19899
|
+
|
|
19900
|
+
return UnclickableBlotSpec;
|
|
19901
|
+
}(_BlotSpec3.default);
|
|
19904
19902
|
|
|
19905
|
-
|
|
19903
|
+
UnclickableBlotSpec.default = UnclickableBlotSpec$1;
|
|
19904
|
+
return UnclickableBlotSpec;
|
|
19905
|
+
}
|
|
19906
19906
|
|
|
19907
19907
|
var hasRequiredIframeVideoSpec;
|
|
19908
19908
|
|
|
@@ -19914,7 +19914,7 @@
|
|
|
19914
19914
|
value: true
|
|
19915
19915
|
});
|
|
19916
19916
|
|
|
19917
|
-
var _UnclickableBlotSpec2 =
|
|
19917
|
+
var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
|
|
19918
19918
|
|
|
19919
19919
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19920
19920
|
|
|
@@ -20114,7 +20114,7 @@
|
|
|
20114
20114
|
}
|
|
20115
20115
|
});
|
|
20116
20116
|
|
|
20117
|
-
var _ResizeAction =
|
|
20117
|
+
var _ResizeAction = ResizeAction$1;
|
|
20118
20118
|
|
|
20119
20119
|
Object.defineProperty(exports, 'ResizeAction', {
|
|
20120
20120
|
enumerable: true,
|
|
@@ -20141,7 +20141,7 @@
|
|
|
20141
20141
|
}
|
|
20142
20142
|
});
|
|
20143
20143
|
|
|
20144
|
-
var _UnclickableBlotSpec =
|
|
20144
|
+
var _UnclickableBlotSpec = requireUnclickableBlotSpec();
|
|
20145
20145
|
|
|
20146
20146
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
20147
20147
|
enumerable: true,
|
|
@@ -20912,21 +20912,11 @@
|
|
|
20912
20912
|
quill.on('selection-change', updateHistoryState);
|
|
20913
20913
|
addLinkClickListener();
|
|
20914
20914
|
const toolbarClickHandler = (event) => {
|
|
20915
|
-
var _a;
|
|
20916
20915
|
const target = event.target;
|
|
20917
|
-
|
|
20918
|
-
|
|
20919
|
-
const currentEditorContainer = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.closest('.quill-editor-container');
|
|
20920
|
-
if (clickedEditorContainer === currentEditorContainer) {
|
|
20921
|
-
controlToolbarVisible(true);
|
|
20922
|
-
}
|
|
20923
|
-
else {
|
|
20924
|
-
controlToolbarVisible(false);
|
|
20925
|
-
}
|
|
20926
|
-
}
|
|
20927
|
-
else {
|
|
20928
|
-
controlToolbarVisible(false);
|
|
20916
|
+
if (target.closest('.quill-editor-container')) {
|
|
20917
|
+
return;
|
|
20929
20918
|
}
|
|
20919
|
+
controlToolbarVisible(false);
|
|
20930
20920
|
};
|
|
20931
20921
|
addClickHandler(toolbarClickHandler);
|
|
20932
20922
|
addClickHandler(handleBlotFormatterClick);
|