pxx-vue-quill 1.0.29 → 1.0.30
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.cjs.js +2 -2
- package/dist/vue-quill.cjs.prod.js +2 -2
- package/dist/vue-quill.esm-browser.js +187 -171
- package/dist/vue-quill.esm-browser.prod.js +2 -2
- package/dist/vue-quill.esm-bundler.js +2 -2
- package/dist/vue-quill.esm-bundler.prod.js +2 -2
- package/dist/vue-quill.global.js +126 -134
- package/dist/vue-quill.global.prod.js +2 -2
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-08-
|
|
10
|
+
* Date: 2025-08-28T06:39:34.530Z
|
|
11
11
|
*/
|
|
12
12
|
import { defineComponent, h, onMounted, onBeforeUnmount, ref, computed, watchEffect, watch, nextTick } from 'vue';
|
|
13
13
|
|
|
@@ -18553,44 +18553,52 @@ var es = /*#__PURE__*/Object.freeze({
|
|
|
18553
18553
|
|
|
18554
18554
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
|
|
18555
18555
|
|
|
18556
|
-
var Action
|
|
18556
|
+
var Action = {};
|
|
18557
18557
|
|
|
18558
|
-
|
|
18559
|
-
value: true
|
|
18560
|
-
});
|
|
18558
|
+
var hasRequiredAction;
|
|
18561
18559
|
|
|
18562
|
-
|
|
18560
|
+
function requireAction () {
|
|
18561
|
+
if (hasRequiredAction) return Action;
|
|
18562
|
+
hasRequiredAction = 1;
|
|
18563
18563
|
|
|
18564
|
-
|
|
18564
|
+
Object.defineProperty(Action, "__esModule", {
|
|
18565
|
+
value: true
|
|
18566
|
+
});
|
|
18565
18567
|
|
|
18566
|
-
|
|
18568
|
+
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; }; }();
|
|
18567
18569
|
|
|
18568
|
-
|
|
18570
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
18569
18571
|
|
|
18570
|
-
|
|
18572
|
+
_interopRequireDefault(_BlotFormatter);
|
|
18571
18573
|
|
|
18572
|
-
|
|
18573
|
-
function Action(formatter) {
|
|
18574
|
-
_classCallCheck$3(this, Action);
|
|
18574
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18575
18575
|
|
|
18576
|
-
|
|
18577
|
-
}
|
|
18576
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18578
18577
|
|
|
18579
|
-
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
}, {
|
|
18583
|
-
key: 'onDestroy',
|
|
18584
|
-
value: function onDestroy() {}
|
|
18585
|
-
}, {
|
|
18586
|
-
key: 'onUpdate',
|
|
18587
|
-
value: function onUpdate() {}
|
|
18588
|
-
}]);
|
|
18578
|
+
var Action$1 = function () {
|
|
18579
|
+
function Action(formatter) {
|
|
18580
|
+
_classCallCheck(this, Action);
|
|
18589
18581
|
|
|
18590
|
-
|
|
18591
|
-
}
|
|
18582
|
+
this.formatter = formatter;
|
|
18583
|
+
}
|
|
18584
|
+
|
|
18585
|
+
_createClass(Action, [{
|
|
18586
|
+
key: 'onCreate',
|
|
18587
|
+
value: function onCreate() {}
|
|
18588
|
+
}, {
|
|
18589
|
+
key: 'onDestroy',
|
|
18590
|
+
value: function onDestroy() {}
|
|
18591
|
+
}, {
|
|
18592
|
+
key: 'onUpdate',
|
|
18593
|
+
value: function onUpdate() {}
|
|
18594
|
+
}]);
|
|
18592
18595
|
|
|
18593
|
-
|
|
18596
|
+
return Action;
|
|
18597
|
+
}();
|
|
18598
|
+
|
|
18599
|
+
Action.default = Action$1;
|
|
18600
|
+
return Action;
|
|
18601
|
+
}
|
|
18594
18602
|
|
|
18595
18603
|
var hasRequiredBlotFormatter;
|
|
18596
18604
|
|
|
@@ -18612,7 +18620,7 @@ function requireBlotFormatter () {
|
|
|
18612
18620
|
|
|
18613
18621
|
var _Options2 = _interopRequireDefault(_Options);
|
|
18614
18622
|
|
|
18615
|
-
var _Action =
|
|
18623
|
+
var _Action = requireAction();
|
|
18616
18624
|
|
|
18617
18625
|
_interopRequireDefault(_Action);
|
|
18618
18626
|
|
|
@@ -18770,11 +18778,11 @@ Object.defineProperty(DefaultAligner$1, "__esModule", {
|
|
|
18770
18778
|
value: true
|
|
18771
18779
|
});
|
|
18772
18780
|
|
|
18773
|
-
var _createClass$
|
|
18781
|
+
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; }; }();
|
|
18774
18782
|
|
|
18775
18783
|
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; }
|
|
18776
18784
|
|
|
18777
|
-
function _classCallCheck$
|
|
18785
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18778
18786
|
|
|
18779
18787
|
var LEFT_ALIGN = 'left';
|
|
18780
18788
|
var CENTER_ALIGN = 'center';
|
|
@@ -18785,7 +18793,7 @@ var DefaultAligner = function () {
|
|
|
18785
18793
|
var _this = this,
|
|
18786
18794
|
_alignments;
|
|
18787
18795
|
|
|
18788
|
-
_classCallCheck$
|
|
18796
|
+
_classCallCheck$1(this, DefaultAligner);
|
|
18789
18797
|
|
|
18790
18798
|
this.applyStyle = options.aligner.applyStyle;
|
|
18791
18799
|
this.alignAttribute = options.attribute;
|
|
@@ -18813,7 +18821,7 @@ var DefaultAligner = function () {
|
|
|
18813
18821
|
}), _alignments);
|
|
18814
18822
|
}
|
|
18815
18823
|
|
|
18816
|
-
_createClass$
|
|
18824
|
+
_createClass$1(DefaultAligner, [{
|
|
18817
18825
|
key: 'getAlignments',
|
|
18818
18826
|
value: function getAlignments() {
|
|
18819
18827
|
var _this2 = this;
|
|
@@ -19051,7 +19059,7 @@ function requireAlignAction () {
|
|
|
19051
19059
|
|
|
19052
19060
|
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; }; }();
|
|
19053
19061
|
|
|
19054
|
-
var _Action2 =
|
|
19062
|
+
var _Action2 = requireAction();
|
|
19055
19063
|
|
|
19056
19064
|
var _Action3 = _interopRequireDefault(_Action2);
|
|
19057
19065
|
|
|
@@ -19122,31 +19130,31 @@ Object.defineProperty(ResizeAction$1, "__esModule", {
|
|
|
19122
19130
|
value: true
|
|
19123
19131
|
});
|
|
19124
19132
|
|
|
19125
|
-
var _createClass
|
|
19133
|
+
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; }; }();
|
|
19126
19134
|
|
|
19127
|
-
var _Action2 =
|
|
19135
|
+
var _Action2 = requireAction();
|
|
19128
19136
|
|
|
19129
|
-
var _Action3 = _interopRequireDefault
|
|
19137
|
+
var _Action3 = _interopRequireDefault(_Action2);
|
|
19130
19138
|
|
|
19131
|
-
var _BlotFormatter
|
|
19139
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19132
19140
|
|
|
19133
|
-
_interopRequireDefault
|
|
19141
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19134
19142
|
|
|
19135
|
-
function _interopRequireDefault
|
|
19143
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19136
19144
|
|
|
19137
|
-
function _classCallCheck
|
|
19145
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19138
19146
|
|
|
19139
|
-
function _possibleConstructorReturn
|
|
19147
|
+
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; }
|
|
19140
19148
|
|
|
19141
|
-
function _inherits
|
|
19149
|
+
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; }
|
|
19142
19150
|
|
|
19143
19151
|
var ResizeAction = function (_Action) {
|
|
19144
|
-
_inherits
|
|
19152
|
+
_inherits(ResizeAction, _Action);
|
|
19145
19153
|
|
|
19146
19154
|
function ResizeAction(formatter) {
|
|
19147
|
-
_classCallCheck
|
|
19155
|
+
_classCallCheck(this, ResizeAction);
|
|
19148
19156
|
|
|
19149
|
-
var _this = _possibleConstructorReturn
|
|
19157
|
+
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19150
19158
|
|
|
19151
19159
|
_this.onMouseDown = function (event) {
|
|
19152
19160
|
if (!(event.target instanceof HTMLElement)) {
|
|
@@ -19218,7 +19226,7 @@ var ResizeAction = function (_Action) {
|
|
|
19218
19226
|
return _this;
|
|
19219
19227
|
}
|
|
19220
19228
|
|
|
19221
|
-
_createClass
|
|
19229
|
+
_createClass(ResizeAction, [{
|
|
19222
19230
|
key: 'onCreate',
|
|
19223
19231
|
value: function onCreate() {
|
|
19224
19232
|
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
@@ -19311,7 +19319,7 @@ function requireDeleteAction () {
|
|
|
19311
19319
|
|
|
19312
19320
|
var _quill2 = _interopRequireDefault(_quill);
|
|
19313
19321
|
|
|
19314
|
-
var _Action2 =
|
|
19322
|
+
var _Action2 = requireAction();
|
|
19315
19323
|
|
|
19316
19324
|
var _Action3 = _interopRequireDefault(_Action2);
|
|
19317
19325
|
|
|
@@ -19390,7 +19398,7 @@ function requireBlotSpec () {
|
|
|
19390
19398
|
|
|
19391
19399
|
_interopRequireDefault(_BlotFormatter);
|
|
19392
19400
|
|
|
19393
|
-
var _Action =
|
|
19401
|
+
var _Action = requireAction();
|
|
19394
19402
|
|
|
19395
19403
|
_interopRequireDefault(_Action);
|
|
19396
19404
|
|
|
@@ -19530,148 +19538,156 @@ function requireImageSpec () {
|
|
|
19530
19538
|
|
|
19531
19539
|
var IframeVideoSpec = {};
|
|
19532
19540
|
|
|
19533
|
-
var UnclickableBlotSpec
|
|
19541
|
+
var UnclickableBlotSpec = {};
|
|
19534
19542
|
|
|
19535
|
-
|
|
19536
|
-
value: true
|
|
19537
|
-
});
|
|
19543
|
+
var hasRequiredUnclickableBlotSpec;
|
|
19538
19544
|
|
|
19539
|
-
|
|
19545
|
+
function requireUnclickableBlotSpec () {
|
|
19546
|
+
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19547
|
+
hasRequiredUnclickableBlotSpec = 1;
|
|
19540
19548
|
|
|
19541
|
-
|
|
19549
|
+
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19550
|
+
value: true
|
|
19551
|
+
});
|
|
19542
19552
|
|
|
19543
|
-
var
|
|
19553
|
+
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; }; }();
|
|
19544
19554
|
|
|
19545
|
-
var
|
|
19555
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19546
19556
|
|
|
19547
|
-
_interopRequireDefault(
|
|
19557
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19548
19558
|
|
|
19549
|
-
|
|
19559
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19550
19560
|
|
|
19551
|
-
|
|
19561
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19552
19562
|
|
|
19553
|
-
function
|
|
19563
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19554
19564
|
|
|
19555
|
-
function
|
|
19565
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19556
19566
|
|
|
19557
|
-
|
|
19558
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19567
|
+
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; }
|
|
19559
19568
|
|
|
19560
|
-
|
|
19561
|
-
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19569
|
+
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; }
|
|
19562
19570
|
|
|
19563
|
-
|
|
19564
|
-
|
|
19571
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19572
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19565
19573
|
|
|
19566
|
-
|
|
19574
|
+
var UnclickableBlotSpec$1 = function (_BlotSpec) {
|
|
19575
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19567
19576
|
|
|
19568
|
-
|
|
19569
|
-
|
|
19570
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19571
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19572
|
-
});
|
|
19573
|
-
};
|
|
19577
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19578
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19574
19579
|
|
|
19575
|
-
|
|
19576
|
-
var unclickable = event.target;
|
|
19577
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19578
|
-
return;
|
|
19579
|
-
}
|
|
19580
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19580
19581
|
|
|
19581
|
-
|
|
19582
|
-
|
|
19583
|
-
|
|
19582
|
+
_this.onTextChange = function () {
|
|
19583
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19584
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19585
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19586
|
+
});
|
|
19587
|
+
};
|
|
19584
19588
|
|
|
19585
|
-
|
|
19586
|
-
|
|
19587
|
-
|
|
19588
|
-
|
|
19589
|
-
|
|
19590
|
-
};
|
|
19589
|
+
_this.onMouseEnter = function (event) {
|
|
19590
|
+
var unclickable = event.target;
|
|
19591
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19592
|
+
return;
|
|
19593
|
+
}
|
|
19591
19594
|
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
|
|
19595
|
-
return _this;
|
|
19596
|
-
}
|
|
19595
|
+
_this.nextUnclickable = unclickable;
|
|
19596
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19597
|
+
};
|
|
19597
19598
|
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19605
|
-
*/
|
|
19606
|
-
document.body.appendChild(this.createProxyImage());
|
|
19607
|
-
}
|
|
19599
|
+
_this.onProxyImageClick = function () {
|
|
19600
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19601
|
+
_this.nextUnclickable = null;
|
|
19602
|
+
_this.formatter.show(_this);
|
|
19603
|
+
_this.hideProxyImage();
|
|
19604
|
+
};
|
|
19608
19605
|
|
|
19609
|
-
|
|
19610
|
-
|
|
19611
|
-
|
|
19612
|
-
|
|
19613
|
-
|
|
19614
|
-
key: 'getTargetElement',
|
|
19615
|
-
value: function getTargetElement() {
|
|
19616
|
-
return this.unclickable;
|
|
19617
|
-
}
|
|
19618
|
-
}, {
|
|
19619
|
-
key: 'getOverlayElement',
|
|
19620
|
-
value: function getOverlayElement() {
|
|
19621
|
-
return this.unclickable;
|
|
19622
|
-
}
|
|
19623
|
-
}, {
|
|
19624
|
-
key: 'onHide',
|
|
19625
|
-
value: function onHide() {
|
|
19626
|
-
this.hideProxyImage();
|
|
19627
|
-
this.nextUnclickable = null;
|
|
19628
|
-
this.unclickable = null;
|
|
19629
|
-
}
|
|
19630
|
-
}, {
|
|
19631
|
-
key: 'createProxyImage',
|
|
19632
|
-
value: function createProxyImage() {
|
|
19633
|
-
var canvas = document.createElement('canvas');
|
|
19634
|
-
var context = canvas.getContext('2d');
|
|
19635
|
-
context.globalAlpha = 0;
|
|
19636
|
-
context.fillRect(0, 0, 1, 1);
|
|
19637
|
-
|
|
19638
|
-
this.proxyImage = document.createElement('img');
|
|
19639
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19640
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19641
|
-
|
|
19642
|
-
Object.assign(this.proxyImage.style, {
|
|
19643
|
-
position: 'absolute',
|
|
19644
|
-
margin: '0'
|
|
19645
|
-
});
|
|
19606
|
+
_this.selector = selector;
|
|
19607
|
+
_this.unclickable = null;
|
|
19608
|
+
_this.nextUnclickable = null;
|
|
19609
|
+
return _this;
|
|
19610
|
+
}
|
|
19646
19611
|
|
|
19647
|
-
|
|
19648
|
-
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
|
|
19652
|
-
|
|
19653
|
-
|
|
19654
|
-
|
|
19655
|
-
|
|
19656
|
-
|
|
19657
|
-
key: 'repositionProxyImage',
|
|
19658
|
-
value: function repositionProxyImage(unclickable) {
|
|
19659
|
-
var rect = unclickable.getBoundingClientRect();
|
|
19660
|
-
|
|
19661
|
-
Object.assign(this.proxyImage.style, {
|
|
19662
|
-
display: 'block',
|
|
19663
|
-
left: rect.left + window.pageXOffset + 'px',
|
|
19664
|
-
top: rect.top + window.pageYOffset + 'px',
|
|
19665
|
-
width: rect.width + 'px',
|
|
19666
|
-
height: rect.height + 'px'
|
|
19667
|
-
});
|
|
19668
|
-
}
|
|
19669
|
-
}]);
|
|
19612
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19613
|
+
key: 'init',
|
|
19614
|
+
value: function init() {
|
|
19615
|
+
if (document.body) {
|
|
19616
|
+
/*
|
|
19617
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19618
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19619
|
+
*/
|
|
19620
|
+
document.body.appendChild(this.createProxyImage());
|
|
19621
|
+
}
|
|
19670
19622
|
|
|
19671
|
-
|
|
19672
|
-
|
|
19623
|
+
this.hideProxyImage();
|
|
19624
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19625
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19626
|
+
}
|
|
19627
|
+
}, {
|
|
19628
|
+
key: 'getTargetElement',
|
|
19629
|
+
value: function getTargetElement() {
|
|
19630
|
+
return this.unclickable;
|
|
19631
|
+
}
|
|
19632
|
+
}, {
|
|
19633
|
+
key: 'getOverlayElement',
|
|
19634
|
+
value: function getOverlayElement() {
|
|
19635
|
+
return this.unclickable;
|
|
19636
|
+
}
|
|
19637
|
+
}, {
|
|
19638
|
+
key: 'onHide',
|
|
19639
|
+
value: function onHide() {
|
|
19640
|
+
this.hideProxyImage();
|
|
19641
|
+
this.nextUnclickable = null;
|
|
19642
|
+
this.unclickable = null;
|
|
19643
|
+
}
|
|
19644
|
+
}, {
|
|
19645
|
+
key: 'createProxyImage',
|
|
19646
|
+
value: function createProxyImage() {
|
|
19647
|
+
var canvas = document.createElement('canvas');
|
|
19648
|
+
var context = canvas.getContext('2d');
|
|
19649
|
+
context.globalAlpha = 0;
|
|
19650
|
+
context.fillRect(0, 0, 1, 1);
|
|
19651
|
+
|
|
19652
|
+
this.proxyImage = document.createElement('img');
|
|
19653
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19654
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19655
|
+
|
|
19656
|
+
Object.assign(this.proxyImage.style, {
|
|
19657
|
+
position: 'absolute',
|
|
19658
|
+
margin: '0'
|
|
19659
|
+
});
|
|
19660
|
+
|
|
19661
|
+
return this.proxyImage;
|
|
19662
|
+
}
|
|
19663
|
+
}, {
|
|
19664
|
+
key: 'hideProxyImage',
|
|
19665
|
+
value: function hideProxyImage() {
|
|
19666
|
+
Object.assign(this.proxyImage.style, {
|
|
19667
|
+
display: 'none'
|
|
19668
|
+
});
|
|
19669
|
+
}
|
|
19670
|
+
}, {
|
|
19671
|
+
key: 'repositionProxyImage',
|
|
19672
|
+
value: function repositionProxyImage(unclickable) {
|
|
19673
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19673
19674
|
|
|
19674
|
-
|
|
19675
|
+
Object.assign(this.proxyImage.style, {
|
|
19676
|
+
display: 'block',
|
|
19677
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19678
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19679
|
+
width: rect.width + 'px',
|
|
19680
|
+
height: rect.height + 'px'
|
|
19681
|
+
});
|
|
19682
|
+
}
|
|
19683
|
+
}]);
|
|
19684
|
+
|
|
19685
|
+
return UnclickableBlotSpec;
|
|
19686
|
+
}(_BlotSpec3.default);
|
|
19687
|
+
|
|
19688
|
+
UnclickableBlotSpec.default = UnclickableBlotSpec$1;
|
|
19689
|
+
return UnclickableBlotSpec;
|
|
19690
|
+
}
|
|
19675
19691
|
|
|
19676
19692
|
var hasRequiredIframeVideoSpec;
|
|
19677
19693
|
|
|
@@ -19683,7 +19699,7 @@ function requireIframeVideoSpec () {
|
|
|
19683
19699
|
value: true
|
|
19684
19700
|
});
|
|
19685
19701
|
|
|
19686
|
-
var _UnclickableBlotSpec2 =
|
|
19702
|
+
var _UnclickableBlotSpec2 = requireUnclickableBlotSpec();
|
|
19687
19703
|
|
|
19688
19704
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19689
19705
|
|
|
@@ -19838,7 +19854,7 @@ function requireOptions () {
|
|
|
19838
19854
|
}
|
|
19839
19855
|
});
|
|
19840
19856
|
|
|
19841
|
-
var _Action =
|
|
19857
|
+
var _Action = requireAction();
|
|
19842
19858
|
|
|
19843
19859
|
Object.defineProperty(exports, 'Action', {
|
|
19844
19860
|
enumerable: true,
|
|
@@ -19910,7 +19926,7 @@ function requireOptions () {
|
|
|
19910
19926
|
}
|
|
19911
19927
|
});
|
|
19912
19928
|
|
|
19913
|
-
var _UnclickableBlotSpec =
|
|
19929
|
+
var _UnclickableBlotSpec = requireUnclickableBlotSpec();
|
|
19914
19930
|
|
|
19915
19931
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
19916
19932
|
enumerable: true,
|
|
@@ -20566,7 +20582,7 @@ const QuillEditor = defineComponent({
|
|
|
20566
20582
|
}
|
|
20567
20583
|
};
|
|
20568
20584
|
watch(() => props.content, (newContent) => {
|
|
20569
|
-
if (!quill ||
|
|
20585
|
+
if (!quill || internalModelEquals(newContent))
|
|
20570
20586
|
return;
|
|
20571
20587
|
const selection = quill.getSelection();
|
|
20572
20588
|
if (selection) {
|