pxx-vue-quill 1.0.74 → 1.0.75
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 +268 -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-
|
|
10
|
+
* Date: 2025-09-05T07:17:04.206Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -18781,11 +18781,11 @@
|
|
|
18781
18781
|
value: true
|
|
18782
18782
|
});
|
|
18783
18783
|
|
|
18784
|
-
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; }; }();
|
|
18784
|
+
var _createClass$2 = 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
18785
|
|
|
18786
18786
|
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; }
|
|
18787
18787
|
|
|
18788
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18788
|
+
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18789
18789
|
|
|
18790
18790
|
var LEFT_ALIGN = 'left';
|
|
18791
18791
|
var CENTER_ALIGN = 'center';
|
|
@@ -18796,7 +18796,7 @@
|
|
|
18796
18796
|
var _this = this,
|
|
18797
18797
|
_alignments;
|
|
18798
18798
|
|
|
18799
|
-
_classCallCheck(this, DefaultAligner);
|
|
18799
|
+
_classCallCheck$2(this, DefaultAligner);
|
|
18800
18800
|
|
|
18801
18801
|
this.applyStyle = options.aligner.applyStyle;
|
|
18802
18802
|
this.alignAttribute = options.attribute;
|
|
@@ -18824,7 +18824,7 @@
|
|
|
18824
18824
|
}), _alignments);
|
|
18825
18825
|
}
|
|
18826
18826
|
|
|
18827
|
-
_createClass(DefaultAligner, [{
|
|
18827
|
+
_createClass$2(DefaultAligner, [{
|
|
18828
18828
|
key: 'getAlignments',
|
|
18829
18829
|
value: function getAlignments() {
|
|
18830
18830
|
var _this2 = this;
|
|
@@ -19127,190 +19127,182 @@
|
|
|
19127
19127
|
return AlignAction;
|
|
19128
19128
|
}
|
|
19129
19129
|
|
|
19130
|
-
var ResizeAction = {};
|
|
19131
|
-
|
|
19132
|
-
var hasRequiredResizeAction;
|
|
19130
|
+
var ResizeAction$1 = {};
|
|
19133
19131
|
|
|
19134
|
-
|
|
19135
|
-
|
|
19136
|
-
|
|
19137
|
-
|
|
19138
|
-
Object.defineProperty(ResizeAction, "__esModule", {
|
|
19139
|
-
value: true
|
|
19140
|
-
});
|
|
19132
|
+
Object.defineProperty(ResizeAction$1, "__esModule", {
|
|
19133
|
+
value: true
|
|
19134
|
+
});
|
|
19141
19135
|
|
|
19142
|
-
|
|
19136
|
+
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; }; }();
|
|
19143
19137
|
|
|
19144
|
-
|
|
19138
|
+
var _Action2 = requireAction();
|
|
19145
19139
|
|
|
19146
|
-
|
|
19140
|
+
var _Action3 = _interopRequireDefault$1(_Action2);
|
|
19147
19141
|
|
|
19148
|
-
|
|
19142
|
+
var _BlotFormatter$1 = requireBlotFormatter();
|
|
19149
19143
|
|
|
19150
|
-
|
|
19144
|
+
_interopRequireDefault$1(_BlotFormatter$1);
|
|
19151
19145
|
|
|
19152
|
-
|
|
19146
|
+
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19153
19147
|
|
|
19154
|
-
|
|
19148
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19155
19149
|
|
|
19156
|
-
|
|
19150
|
+
function _possibleConstructorReturn$1(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; }
|
|
19157
19151
|
|
|
19158
|
-
|
|
19152
|
+
function _inherits$1(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; }
|
|
19159
19153
|
|
|
19160
|
-
|
|
19161
|
-
|
|
19154
|
+
var ResizeAction = function (_Action) {
|
|
19155
|
+
_inherits$1(ResizeAction, _Action);
|
|
19162
19156
|
|
|
19163
|
-
|
|
19164
|
-
|
|
19157
|
+
function ResizeAction(formatter) {
|
|
19158
|
+
_classCallCheck$1(this, ResizeAction);
|
|
19165
19159
|
|
|
19166
|
-
|
|
19160
|
+
var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19167
19161
|
|
|
19168
|
-
|
|
19169
|
-
|
|
19170
|
-
|
|
19171
|
-
|
|
19172
|
-
|
|
19173
|
-
|
|
19162
|
+
_this.onMouseDown = function (event) {
|
|
19163
|
+
if (!(event.target instanceof HTMLElement)) {
|
|
19164
|
+
return;
|
|
19165
|
+
}
|
|
19166
|
+
_this.dragHandle = event.target;
|
|
19167
|
+
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19174
19168
|
|
|
19175
|
-
|
|
19176
|
-
|
|
19177
|
-
|
|
19169
|
+
if (!_this.formatter.currentSpec) {
|
|
19170
|
+
return;
|
|
19171
|
+
}
|
|
19178
19172
|
|
|
19179
|
-
|
|
19180
|
-
|
|
19181
|
-
|
|
19182
|
-
|
|
19173
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19174
|
+
if (!target) {
|
|
19175
|
+
return;
|
|
19176
|
+
}
|
|
19183
19177
|
|
|
19184
|
-
|
|
19178
|
+
var rect = target.getBoundingClientRect();
|
|
19185
19179
|
|
|
19186
|
-
|
|
19187
|
-
|
|
19188
|
-
|
|
19180
|
+
_this.dragStartX = event.clientX;
|
|
19181
|
+
_this.preDragWidth = rect.width;
|
|
19182
|
+
_this.targetRatio = rect.height / rect.width;
|
|
19189
19183
|
|
|
19190
|
-
|
|
19191
|
-
|
|
19192
|
-
|
|
19184
|
+
document.addEventListener('mousemove', _this.onDrag);
|
|
19185
|
+
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19186
|
+
};
|
|
19193
19187
|
|
|
19194
|
-
|
|
19195
|
-
|
|
19196
|
-
|
|
19197
|
-
|
|
19188
|
+
_this.onDrag = function (event) {
|
|
19189
|
+
if (!_this.formatter.currentSpec) {
|
|
19190
|
+
return;
|
|
19191
|
+
}
|
|
19198
19192
|
|
|
19199
|
-
|
|
19200
|
-
|
|
19201
|
-
|
|
19202
|
-
|
|
19193
|
+
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19194
|
+
if (!target) {
|
|
19195
|
+
return;
|
|
19196
|
+
}
|
|
19203
19197
|
|
|
19204
|
-
|
|
19205
|
-
|
|
19198
|
+
var deltaX = event.clientX - _this.dragStartX;
|
|
19199
|
+
var newWidth = 0;
|
|
19206
19200
|
|
|
19207
|
-
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
|
|
19201
|
+
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19202
|
+
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19203
|
+
} else {
|
|
19204
|
+
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19205
|
+
}
|
|
19212
19206
|
|
|
19213
|
-
|
|
19207
|
+
var newHeight = _this.targetRatio * newWidth;
|
|
19214
19208
|
|
|
19215
|
-
|
|
19216
|
-
|
|
19209
|
+
target.setAttribute('width', '' + newWidth);
|
|
19210
|
+
target.setAttribute('height', '' + newHeight);
|
|
19217
19211
|
|
|
19218
|
-
|
|
19219
|
-
|
|
19212
|
+
_this.formatter.update();
|
|
19213
|
+
};
|
|
19220
19214
|
|
|
19221
|
-
|
|
19222
|
-
|
|
19223
|
-
|
|
19224
|
-
|
|
19225
|
-
|
|
19215
|
+
_this.onMouseUp = function () {
|
|
19216
|
+
_this.setCursor('');
|
|
19217
|
+
document.removeEventListener('mousemove', _this.onDrag);
|
|
19218
|
+
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19219
|
+
};
|
|
19226
19220
|
|
|
19227
|
-
|
|
19228
|
-
|
|
19229
|
-
|
|
19230
|
-
|
|
19231
|
-
|
|
19232
|
-
|
|
19233
|
-
|
|
19234
|
-
|
|
19235
|
-
|
|
19236
|
-
|
|
19221
|
+
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19222
|
+
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
19223
|
+
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19224
|
+
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19225
|
+
_this.dragHandle = null;
|
|
19226
|
+
_this.dragStartX = 0;
|
|
19227
|
+
_this.preDragWidth = 0;
|
|
19228
|
+
_this.targetRatio = 0;
|
|
19229
|
+
return _this;
|
|
19230
|
+
}
|
|
19237
19231
|
|
|
19238
|
-
|
|
19239
|
-
|
|
19240
|
-
|
|
19241
|
-
|
|
19242
|
-
|
|
19243
|
-
|
|
19244
|
-
|
|
19232
|
+
_createClass$1(ResizeAction, [{
|
|
19233
|
+
key: 'onCreate',
|
|
19234
|
+
value: function onCreate() {
|
|
19235
|
+
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19236
|
+
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19237
|
+
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19238
|
+
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19245
19239
|
|
|
19246
|
-
|
|
19247
|
-
|
|
19248
|
-
|
|
19249
|
-
|
|
19250
|
-
|
|
19251
|
-
|
|
19252
|
-
|
|
19253
|
-
|
|
19254
|
-
|
|
19255
|
-
|
|
19256
|
-
|
|
19257
|
-
|
|
19258
|
-
|
|
19259
|
-
|
|
19260
|
-
|
|
19261
|
-
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
|
-
|
|
19265
|
-
|
|
19266
|
-
|
|
19267
|
-
|
|
19240
|
+
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19241
|
+
}
|
|
19242
|
+
}, {
|
|
19243
|
+
key: 'onDestroy',
|
|
19244
|
+
value: function onDestroy() {
|
|
19245
|
+
this.setCursor('');
|
|
19246
|
+
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19247
|
+
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19248
|
+
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19249
|
+
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19250
|
+
}
|
|
19251
|
+
}, {
|
|
19252
|
+
key: 'createHandle',
|
|
19253
|
+
value: function createHandle(position, cursor) {
|
|
19254
|
+
var box = document.createElement('div');
|
|
19255
|
+
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19256
|
+
box.setAttribute('data-position', position);
|
|
19257
|
+
box.style.cursor = cursor;
|
|
19258
|
+
|
|
19259
|
+
if (this.formatter.options.resize.handleStyle) {
|
|
19260
|
+
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19261
|
+
}
|
|
19268
19262
|
|
|
19269
|
-
|
|
19263
|
+
box.addEventListener('mousedown', this.onMouseDown);
|
|
19270
19264
|
|
|
19271
|
-
|
|
19272
|
-
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
|
|
19276
|
-
|
|
19277
|
-
|
|
19278
|
-
|
|
19279
|
-
|
|
19280
|
-
|
|
19281
|
-
|
|
19282
|
-
|
|
19283
|
-
|
|
19284
|
-
|
|
19285
|
-
|
|
19265
|
+
return box;
|
|
19266
|
+
}
|
|
19267
|
+
}, {
|
|
19268
|
+
key: 'repositionHandles',
|
|
19269
|
+
value: function repositionHandles(handleStyle) {
|
|
19270
|
+
var handleXOffset = '0px';
|
|
19271
|
+
var handleYOffset = '0px';
|
|
19272
|
+
if (handleStyle) {
|
|
19273
|
+
if (handleStyle.width) {
|
|
19274
|
+
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19275
|
+
}
|
|
19276
|
+
if (handleStyle.height) {
|
|
19277
|
+
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19278
|
+
}
|
|
19279
|
+
}
|
|
19286
19280
|
|
|
19287
|
-
|
|
19288
|
-
|
|
19289
|
-
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19281
|
+
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
19282
|
+
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19283
|
+
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19284
|
+
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19285
|
+
}
|
|
19286
|
+
}, {
|
|
19287
|
+
key: 'setCursor',
|
|
19288
|
+
value: function setCursor(value) {
|
|
19289
|
+
if (document.body) {
|
|
19290
|
+
document.body.style.cursor = value;
|
|
19291
|
+
}
|
|
19298
19292
|
|
|
19299
|
-
|
|
19300
|
-
|
|
19301
|
-
|
|
19302
|
-
|
|
19303
|
-
|
|
19304
|
-
|
|
19305
|
-
|
|
19306
|
-
|
|
19293
|
+
if (this.formatter.currentSpec) {
|
|
19294
|
+
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19295
|
+
if (target) {
|
|
19296
|
+
target.style.cursor = value;
|
|
19297
|
+
}
|
|
19298
|
+
}
|
|
19299
|
+
}
|
|
19300
|
+
}]);
|
|
19307
19301
|
|
|
19308
|
-
|
|
19309
|
-
|
|
19302
|
+
return ResizeAction;
|
|
19303
|
+
}(_Action3.default);
|
|
19310
19304
|
|
|
19311
|
-
|
|
19312
|
-
return ResizeAction;
|
|
19313
|
-
}
|
|
19305
|
+
ResizeAction$1.default = ResizeAction;
|
|
19314
19306
|
|
|
19315
19307
|
var DeleteAction = {};
|
|
19316
19308
|
|
|
@@ -19417,7 +19409,7 @@
|
|
|
19417
19409
|
|
|
19418
19410
|
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19419
19411
|
|
|
19420
|
-
var _ResizeAction =
|
|
19412
|
+
var _ResizeAction = ResizeAction$1;
|
|
19421
19413
|
|
|
19422
19414
|
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19423
19415
|
|
|
@@ -19549,156 +19541,148 @@
|
|
|
19549
19541
|
|
|
19550
19542
|
var IframeVideoSpec = {};
|
|
19551
19543
|
|
|
19552
|
-
var UnclickableBlotSpec = {};
|
|
19544
|
+
var UnclickableBlotSpec$1 = {};
|
|
19553
19545
|
|
|
19554
|
-
|
|
19555
|
-
|
|
19556
|
-
|
|
19557
|
-
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19558
|
-
hasRequiredUnclickableBlotSpec = 1;
|
|
19559
|
-
|
|
19560
|
-
Object.defineProperty(UnclickableBlotSpec, "__esModule", {
|
|
19561
|
-
value: true
|
|
19562
|
-
});
|
|
19546
|
+
Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
|
|
19547
|
+
value: true
|
|
19548
|
+
});
|
|
19563
19549
|
|
|
19564
|
-
|
|
19550
|
+
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; }; }();
|
|
19565
19551
|
|
|
19566
|
-
|
|
19552
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19567
19553
|
|
|
19568
|
-
|
|
19554
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19569
19555
|
|
|
19570
|
-
|
|
19556
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19571
19557
|
|
|
19572
|
-
|
|
19558
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19573
19559
|
|
|
19574
|
-
|
|
19560
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19575
19561
|
|
|
19576
|
-
|
|
19562
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19577
19563
|
|
|
19578
|
-
|
|
19564
|
+
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; }
|
|
19579
19565
|
|
|
19580
|
-
|
|
19566
|
+
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; }
|
|
19581
19567
|
|
|
19582
|
-
|
|
19583
|
-
|
|
19568
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19569
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19584
19570
|
|
|
19585
|
-
|
|
19586
|
-
|
|
19571
|
+
var UnclickableBlotSpec = function (_BlotSpec) {
|
|
19572
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19587
19573
|
|
|
19588
|
-
|
|
19589
|
-
|
|
19574
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19575
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19590
19576
|
|
|
19591
|
-
|
|
19577
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19592
19578
|
|
|
19593
|
-
|
|
19594
|
-
|
|
19595
|
-
|
|
19596
|
-
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19600
|
-
_this.onMouseEnter = function (event) {
|
|
19601
|
-
var unclickable = event.target;
|
|
19602
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19603
|
-
return;
|
|
19604
|
-
}
|
|
19579
|
+
_this.onTextChange = function () {
|
|
19580
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19581
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19582
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19583
|
+
});
|
|
19584
|
+
};
|
|
19605
19585
|
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
|
|
19586
|
+
_this.onMouseEnter = function (event) {
|
|
19587
|
+
var unclickable = event.target;
|
|
19588
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19589
|
+
return;
|
|
19590
|
+
}
|
|
19609
19591
|
|
|
19610
|
-
|
|
19611
|
-
|
|
19612
|
-
|
|
19613
|
-
_this.formatter.show(_this);
|
|
19614
|
-
_this.hideProxyImage();
|
|
19615
|
-
};
|
|
19592
|
+
_this.nextUnclickable = unclickable;
|
|
19593
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19594
|
+
};
|
|
19616
19595
|
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19620
|
-
|
|
19621
|
-
|
|
19596
|
+
_this.onProxyImageClick = function () {
|
|
19597
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19598
|
+
_this.nextUnclickable = null;
|
|
19599
|
+
_this.formatter.show(_this);
|
|
19600
|
+
_this.hideProxyImage();
|
|
19601
|
+
};
|
|
19622
19602
|
|
|
19623
|
-
|
|
19624
|
-
|
|
19625
|
-
|
|
19626
|
-
|
|
19627
|
-
|
|
19628
|
-
it's important that this is attached to the body instead of the root quill element.
|
|
19629
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19630
|
-
*/
|
|
19631
|
-
document.body.appendChild(this.createProxyImage());
|
|
19632
|
-
}
|
|
19603
|
+
_this.selector = selector;
|
|
19604
|
+
_this.unclickable = null;
|
|
19605
|
+
_this.nextUnclickable = null;
|
|
19606
|
+
return _this;
|
|
19607
|
+
}
|
|
19633
19608
|
|
|
19634
|
-
|
|
19635
|
-
|
|
19636
|
-
|
|
19637
|
-
|
|
19638
|
-
|
|
19639
|
-
|
|
19640
|
-
|
|
19641
|
-
|
|
19642
|
-
|
|
19643
|
-
|
|
19644
|
-
key: 'getOverlayElement',
|
|
19645
|
-
value: function getOverlayElement() {
|
|
19646
|
-
return this.unclickable;
|
|
19647
|
-
}
|
|
19648
|
-
}, {
|
|
19649
|
-
key: 'onHide',
|
|
19650
|
-
value: function onHide() {
|
|
19651
|
-
this.hideProxyImage();
|
|
19652
|
-
this.nextUnclickable = null;
|
|
19653
|
-
this.unclickable = null;
|
|
19654
|
-
}
|
|
19655
|
-
}, {
|
|
19656
|
-
key: 'createProxyImage',
|
|
19657
|
-
value: function createProxyImage() {
|
|
19658
|
-
var canvas = document.createElement('canvas');
|
|
19659
|
-
var context = canvas.getContext('2d');
|
|
19660
|
-
context.globalAlpha = 0;
|
|
19661
|
-
context.fillRect(0, 0, 1, 1);
|
|
19662
|
-
|
|
19663
|
-
this.proxyImage = document.createElement('img');
|
|
19664
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19665
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19666
|
-
|
|
19667
|
-
Object.assign(this.proxyImage.style, {
|
|
19668
|
-
position: 'absolute',
|
|
19669
|
-
margin: '0'
|
|
19670
|
-
});
|
|
19609
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19610
|
+
key: 'init',
|
|
19611
|
+
value: function init() {
|
|
19612
|
+
if (document.body) {
|
|
19613
|
+
/*
|
|
19614
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19615
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19616
|
+
*/
|
|
19617
|
+
document.body.appendChild(this.createProxyImage());
|
|
19618
|
+
}
|
|
19671
19619
|
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19620
|
+
this.hideProxyImage();
|
|
19621
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19622
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19623
|
+
}
|
|
19624
|
+
}, {
|
|
19625
|
+
key: 'getTargetElement',
|
|
19626
|
+
value: function getTargetElement() {
|
|
19627
|
+
return this.unclickable;
|
|
19628
|
+
}
|
|
19629
|
+
}, {
|
|
19630
|
+
key: 'getOverlayElement',
|
|
19631
|
+
value: function getOverlayElement() {
|
|
19632
|
+
return this.unclickable;
|
|
19633
|
+
}
|
|
19634
|
+
}, {
|
|
19635
|
+
key: 'onHide',
|
|
19636
|
+
value: function onHide() {
|
|
19637
|
+
this.hideProxyImage();
|
|
19638
|
+
this.nextUnclickable = null;
|
|
19639
|
+
this.unclickable = null;
|
|
19640
|
+
}
|
|
19641
|
+
}, {
|
|
19642
|
+
key: 'createProxyImage',
|
|
19643
|
+
value: function createProxyImage() {
|
|
19644
|
+
var canvas = document.createElement('canvas');
|
|
19645
|
+
var context = canvas.getContext('2d');
|
|
19646
|
+
context.globalAlpha = 0;
|
|
19647
|
+
context.fillRect(0, 0, 1, 1);
|
|
19648
|
+
|
|
19649
|
+
this.proxyImage = document.createElement('img');
|
|
19650
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19651
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19652
|
+
|
|
19653
|
+
Object.assign(this.proxyImage.style, {
|
|
19654
|
+
position: 'absolute',
|
|
19655
|
+
margin: '0'
|
|
19656
|
+
});
|
|
19685
19657
|
|
|
19686
|
-
|
|
19687
|
-
|
|
19688
|
-
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19693
|
-
|
|
19694
|
-
|
|
19658
|
+
return this.proxyImage;
|
|
19659
|
+
}
|
|
19660
|
+
}, {
|
|
19661
|
+
key: 'hideProxyImage',
|
|
19662
|
+
value: function hideProxyImage() {
|
|
19663
|
+
Object.assign(this.proxyImage.style, {
|
|
19664
|
+
display: 'none'
|
|
19665
|
+
});
|
|
19666
|
+
}
|
|
19667
|
+
}, {
|
|
19668
|
+
key: 'repositionProxyImage',
|
|
19669
|
+
value: function repositionProxyImage(unclickable) {
|
|
19670
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19671
|
+
|
|
19672
|
+
Object.assign(this.proxyImage.style, {
|
|
19673
|
+
display: 'block',
|
|
19674
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19675
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19676
|
+
width: rect.width + 'px',
|
|
19677
|
+
height: rect.height + 'px'
|
|
19678
|
+
});
|
|
19679
|
+
}
|
|
19680
|
+
}]);
|
|
19695
19681
|
|
|
19696
|
-
|
|
19697
|
-
|
|
19682
|
+
return UnclickableBlotSpec;
|
|
19683
|
+
}(_BlotSpec3.default);
|
|
19698
19684
|
|
|
19699
|
-
|
|
19700
|
-
return UnclickableBlotSpec;
|
|
19701
|
-
}
|
|
19685
|
+
UnclickableBlotSpec$1.default = UnclickableBlotSpec;
|
|
19702
19686
|
|
|
19703
19687
|
var hasRequiredIframeVideoSpec;
|
|
19704
19688
|
|
|
@@ -19710,7 +19694,7 @@
|
|
|
19710
19694
|
value: true
|
|
19711
19695
|
});
|
|
19712
19696
|
|
|
19713
|
-
var _UnclickableBlotSpec2 =
|
|
19697
|
+
var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
|
|
19714
19698
|
|
|
19715
19699
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19716
19700
|
|
|
@@ -19910,7 +19894,7 @@
|
|
|
19910
19894
|
}
|
|
19911
19895
|
});
|
|
19912
19896
|
|
|
19913
|
-
var _ResizeAction =
|
|
19897
|
+
var _ResizeAction = ResizeAction$1;
|
|
19914
19898
|
|
|
19915
19899
|
Object.defineProperty(exports, 'ResizeAction', {
|
|
19916
19900
|
enumerable: true,
|
|
@@ -19937,7 +19921,7 @@
|
|
|
19937
19921
|
}
|
|
19938
19922
|
});
|
|
19939
19923
|
|
|
19940
|
-
var _UnclickableBlotSpec =
|
|
19924
|
+
var _UnclickableBlotSpec = UnclickableBlotSpec$1;
|
|
19941
19925
|
|
|
19942
19926
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
19943
19927
|
enumerable: true,
|
|
@@ -20008,7 +19992,7 @@
|
|
|
20008
19992
|
vue.h('span', { class: 'ql-formats' }, [
|
|
20009
19993
|
vue.h('select', {
|
|
20010
19994
|
class: 'ql-color ql-picker ql-color-picker ql-expanded',
|
|
20011
|
-
type: '
|
|
19995
|
+
type: 'div'
|
|
20012
19996
|
}, [
|
|
20013
19997
|
vue.h('span', { class: 'ql-picker-label' }, ''),
|
|
20014
19998
|
vue.h('div', { class: 'ql-picker-options' })
|