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