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