pxx-vue-quill 1.0.113 → 1.0.115
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 +307 -1809
- 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-10T03:
|
|
10
|
+
* Date: 2025-09-10T03:59:34.200Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -1993,27 +1993,6 @@
|
|
|
1993
1993
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
1994
1994
|
}
|
|
1995
1995
|
|
|
1996
|
-
function getAugmentedNamespace(n) {
|
|
1997
|
-
var f = n.default;
|
|
1998
|
-
if (typeof f == "function") {
|
|
1999
|
-
var a = function () {
|
|
2000
|
-
return f.apply(this, arguments);
|
|
2001
|
-
};
|
|
2002
|
-
a.prototype = f.prototype;
|
|
2003
|
-
} else a = {};
|
|
2004
|
-
Object.defineProperty(a, '__esModule', {value: true});
|
|
2005
|
-
Object.keys(n).forEach(function (k) {
|
|
2006
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
2007
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
2008
|
-
enumerable: true,
|
|
2009
|
-
get: function () {
|
|
2010
|
-
return n[k];
|
|
2011
|
-
}
|
|
2012
|
-
});
|
|
2013
|
-
});
|
|
2014
|
-
return a;
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
1996
|
var quill = {exports: {}};
|
|
2018
1997
|
|
|
2019
1998
|
(function (module, exports) {
|
|
@@ -18666,1712 +18645,229 @@
|
|
|
18666
18645
|
}
|
|
18667
18646
|
});
|
|
18668
18647
|
|
|
18669
|
-
|
|
18670
|
-
|
|
18671
|
-
|
|
18672
|
-
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
|
|
18685
|
-
|
|
18686
|
-
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18703
|
-
|
|
18704
|
-
|
|
18705
|
-
|
|
18706
|
-
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18648
|
+
function useBlotFormatter(editor, enableImageResize = true) {
|
|
18649
|
+
const quillRef = vue.ref(null);
|
|
18650
|
+
const removeQuillBlotFormatter = () => {
|
|
18651
|
+
var _a;
|
|
18652
|
+
try {
|
|
18653
|
+
const blotFormatter = (_a = quillRef.value) === null || _a === void 0 ? void 0 : _a.getModule('blotFormatter');
|
|
18654
|
+
if (blotFormatter && blotFormatter.overlay) {
|
|
18655
|
+
const overlay = blotFormatter.overlay;
|
|
18656
|
+
if (overlay.parentNode) {
|
|
18657
|
+
overlay.parentNode.removeChild(overlay);
|
|
18658
|
+
}
|
|
18659
|
+
}
|
|
18660
|
+
}
|
|
18661
|
+
catch (error) {
|
|
18662
|
+
console.warn('移除blotFormatter overlay时出错:', error);
|
|
18663
|
+
}
|
|
18664
|
+
};
|
|
18665
|
+
const handleBlotFormatterClick = (event) => {
|
|
18666
|
+
var _a;
|
|
18667
|
+
if (!editor.value)
|
|
18668
|
+
return;
|
|
18669
|
+
const blotFormatter = (_a = quillRef.value) === null || _a === void 0 ? void 0 : _a.getModule('blotFormatter');
|
|
18670
|
+
if (!blotFormatter || !blotFormatter.overlay)
|
|
18671
|
+
return;
|
|
18672
|
+
const isClickInsideEditor = editor.value.contains(event.target);
|
|
18673
|
+
if (!isClickInsideEditor) {
|
|
18674
|
+
removeQuillBlotFormatter();
|
|
18675
|
+
}
|
|
18676
|
+
};
|
|
18677
|
+
const configureBlotFormatter = () => {
|
|
18678
|
+
if (!quillRef.value)
|
|
18679
|
+
return;
|
|
18680
|
+
const blotFormatter = quillRef.value.getModule('blotFormatter');
|
|
18681
|
+
if (blotFormatter) {
|
|
18682
|
+
const originalShow = blotFormatter.show.bind(blotFormatter);
|
|
18683
|
+
blotFormatter.show = function (spec) {
|
|
18684
|
+
var _a;
|
|
18685
|
+
originalShow(spec);
|
|
18686
|
+
const target = (_a = this.currentSpec) === null || _a === void 0 ? void 0 : _a.getTargetElement();
|
|
18687
|
+
if (target && target.tagName === 'IMG') {
|
|
18688
|
+
target.style.maxWidth = '100%';
|
|
18689
|
+
target.style.height = 'auto';
|
|
18690
|
+
target.style.objectFit = 'contain';
|
|
18691
|
+
const width = target.getAttribute('width');
|
|
18692
|
+
if (width) {
|
|
18693
|
+
const naturalWidth = target.naturalWidth;
|
|
18694
|
+
const naturalHeight = target.naturalHeight;
|
|
18695
|
+
if (naturalWidth && naturalHeight) {
|
|
18696
|
+
const aspectRatio = naturalHeight / naturalWidth;
|
|
18697
|
+
const newHeight = Math.round(parseInt(width) * aspectRatio);
|
|
18698
|
+
target.setAttribute('height', '' + newHeight);
|
|
18699
|
+
}
|
|
18700
|
+
}
|
|
18701
|
+
}
|
|
18702
|
+
};
|
|
18703
|
+
}
|
|
18704
|
+
};
|
|
18705
|
+
const applyImageStyle = () => {
|
|
18706
|
+
var _a;
|
|
18707
|
+
if (!quillRef.value)
|
|
18708
|
+
return;
|
|
18709
|
+
const editorElement = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.querySelector('.ql-editor');
|
|
18710
|
+
if (editorElement) {
|
|
18711
|
+
const images = editorElement.querySelectorAll('img');
|
|
18712
|
+
images.forEach(img => {
|
|
18713
|
+
img.style.maxWidth = '100%';
|
|
18714
|
+
img.style.height = 'auto';
|
|
18715
|
+
img.style.objectFit = 'contain';
|
|
18716
|
+
});
|
|
18717
|
+
}
|
|
18718
|
+
};
|
|
18719
|
+
const registerBlotFormatter = () => {
|
|
18720
|
+
var _a;
|
|
18721
|
+
if (!enableImageResize) {
|
|
18722
|
+
return;
|
|
18723
|
+
}
|
|
18724
|
+
try {
|
|
18725
|
+
if (typeof Quill === 'undefined') {
|
|
18726
|
+
console.warn('Quill 未加载,无法注册 BlotFormatter 模块');
|
|
18727
|
+
return;
|
|
18728
|
+
}
|
|
18729
|
+
const existingModule = (_a = Quill.imports) === null || _a === void 0 ? void 0 : _a['modules/blotFormatter'];
|
|
18730
|
+
if (!existingModule) {
|
|
18731
|
+
Quill.register('modules/blotFormatter', existingModule);
|
|
18732
|
+
}
|
|
18733
|
+
else {
|
|
18734
|
+
console.log('BlotFormatter模块已存在,跳过注册');
|
|
18735
|
+
}
|
|
18736
|
+
}
|
|
18737
|
+
catch (error) {
|
|
18738
|
+
console.warn('注册BlotFormatter模块时出错:', error);
|
|
18739
|
+
}
|
|
18740
|
+
};
|
|
18741
|
+
const getBlotFormatterConfig = () => {
|
|
18742
|
+
if (!enableImageResize) {
|
|
18743
|
+
return {};
|
|
18744
|
+
}
|
|
18745
|
+
return {
|
|
18746
|
+
modules: {
|
|
18747
|
+
blotFormatter: true
|
|
18748
|
+
}
|
|
18749
|
+
};
|
|
18750
|
+
};
|
|
18751
|
+
vue.onBeforeUnmount(() => {
|
|
18752
|
+
removeQuillBlotFormatter();
|
|
18753
|
+
});
|
|
18754
|
+
const setQuill = (quillInstance) => {
|
|
18755
|
+
quillRef.value = quillInstance;
|
|
18756
|
+
};
|
|
18757
|
+
return {
|
|
18758
|
+
quillRef,
|
|
18759
|
+
setQuill,
|
|
18760
|
+
handleBlotFormatterClick,
|
|
18761
|
+
configureBlotFormatter,
|
|
18762
|
+
applyImageStyle,
|
|
18763
|
+
registerBlotFormatter,
|
|
18764
|
+
getBlotFormatterConfig
|
|
18765
|
+
};
|
|
18716
18766
|
}
|
|
18717
18767
|
|
|
18718
|
-
function
|
|
18719
|
-
|
|
18720
|
-
|
|
18721
|
-
|
|
18722
|
-
|
|
18723
|
-
|
|
18724
|
-
|
|
18725
|
-
|
|
18726
|
-
|
|
18727
|
-
|
|
18728
|
-
|
|
18729
|
-
|
|
18730
|
-
|
|
18731
|
-
|
|
18732
|
-
|
|
18768
|
+
function useLinkClick(editor, initialHandleCustomLink) {
|
|
18769
|
+
const quillRef = vue.ref(null);
|
|
18770
|
+
const handleCustomLinkRef = vue.ref(initialHandleCustomLink || null);
|
|
18771
|
+
const handleLinkClick = (event) => {
|
|
18772
|
+
if (!quillRef.value || !handleCustomLinkRef.value)
|
|
18773
|
+
return;
|
|
18774
|
+
const target = event.target;
|
|
18775
|
+
if (target.tagName === 'A') {
|
|
18776
|
+
event.preventDefault();
|
|
18777
|
+
event.stopPropagation();
|
|
18778
|
+
try {
|
|
18779
|
+
const linkElement = target;
|
|
18780
|
+
const linkUrl = linkElement.getAttribute('href') || '';
|
|
18781
|
+
const linkText = linkElement.textContent || '';
|
|
18782
|
+
const range = quillRef.value.getSelection();
|
|
18783
|
+
if (range) {
|
|
18784
|
+
const [blot] = quillRef.value.getLeaf(range.index);
|
|
18785
|
+
if (blot && blot.parent && blot.parent.domNode.tagName === 'A') {
|
|
18786
|
+
const linkBlot = blot.parent;
|
|
18787
|
+
const linkIndex = quillRef.value.getIndex(linkBlot);
|
|
18788
|
+
const linkLength = linkBlot.length();
|
|
18789
|
+
quillRef.value.setSelection(linkIndex, linkLength);
|
|
18790
|
+
handleCustomLinkRef.value(true, { url: linkUrl, text: linkText });
|
|
18791
|
+
}
|
|
18792
|
+
}
|
|
18793
|
+
}
|
|
18794
|
+
catch (error) {
|
|
18795
|
+
console.warn('选中链接失败:', error);
|
|
18796
|
+
}
|
|
18797
|
+
}
|
|
18798
|
+
};
|
|
18799
|
+
const addLinkClickListener = () => {
|
|
18800
|
+
if (!quillRef.value)
|
|
18801
|
+
return;
|
|
18802
|
+
vue.nextTick(() => {
|
|
18803
|
+
var _a;
|
|
18804
|
+
const editorElement = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.querySelector('.ql-editor');
|
|
18805
|
+
if (editorElement) {
|
|
18806
|
+
editorElement.removeEventListener('click', handleLinkClick);
|
|
18807
|
+
editorElement.addEventListener('click', handleLinkClick);
|
|
18808
|
+
}
|
|
18809
|
+
});
|
|
18810
|
+
};
|
|
18811
|
+
const setQuill = (quillInstance) => {
|
|
18812
|
+
quillRef.value = quillInstance;
|
|
18813
|
+
};
|
|
18814
|
+
const setHandleCustomLink = (fn) => {
|
|
18815
|
+
handleCustomLinkRef.value = fn;
|
|
18816
|
+
};
|
|
18817
|
+
return {
|
|
18818
|
+
quillRef,
|
|
18819
|
+
setQuill,
|
|
18820
|
+
setHandleCustomLink,
|
|
18821
|
+
handleLinkClick,
|
|
18822
|
+
addLinkClickListener
|
|
18823
|
+
};
|
|
18733
18824
|
}
|
|
18734
18825
|
|
|
18735
|
-
function
|
|
18736
|
-
|
|
18737
|
-
|
|
18738
|
-
|
|
18739
|
-
|
|
18740
|
-
|
|
18741
|
-
|
|
18742
|
-
|
|
18743
|
-
|
|
18744
|
-
|
|
18745
|
-
|
|
18746
|
-
|
|
18747
|
-
|
|
18748
|
-
|
|
18749
|
-
|
|
18750
|
-
|
|
18826
|
+
function useGlobalClick() {
|
|
18827
|
+
const clickHandlers = vue.ref([]);
|
|
18828
|
+
const handleGlobalClick = (event) => {
|
|
18829
|
+
console.log('handleGlobalClick');
|
|
18830
|
+
clickHandlers.value.forEach(handler => {
|
|
18831
|
+
try {
|
|
18832
|
+
handler(event);
|
|
18833
|
+
}
|
|
18834
|
+
catch (error) {
|
|
18835
|
+
console.warn('全局点击事件处理函数执行出错:', error);
|
|
18836
|
+
}
|
|
18837
|
+
});
|
|
18838
|
+
};
|
|
18839
|
+
const addClickHandler = (handler) => {
|
|
18840
|
+
if (typeof handler === 'function' && !clickHandlers.value.includes(handler)) {
|
|
18841
|
+
clickHandlers.value.push(handler);
|
|
18842
|
+
}
|
|
18843
|
+
};
|
|
18844
|
+
const clearClickHandlers = () => {
|
|
18845
|
+
clickHandlers.value = [];
|
|
18846
|
+
};
|
|
18847
|
+
vue.onMounted(() => {
|
|
18848
|
+
window.addEventListener('click', handleGlobalClick, true);
|
|
18849
|
+
});
|
|
18850
|
+
vue.onBeforeUnmount(() => {
|
|
18851
|
+
window.removeEventListener('click', handleGlobalClick, true);
|
|
18852
|
+
clearClickHandlers();
|
|
18853
|
+
});
|
|
18854
|
+
return {
|
|
18855
|
+
addClickHandler,
|
|
18856
|
+
clearClickHandlers,
|
|
18857
|
+
handleGlobalClick
|
|
18858
|
+
};
|
|
18751
18859
|
}
|
|
18752
18860
|
|
|
18753
|
-
|
|
18754
|
-
|
|
18755
|
-
|
|
18756
|
-
|
|
18757
|
-
|
|
18758
|
-
|
|
18759
|
-
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
var deepmerge_1 = deepmerge;
|
|
18764
|
-
|
|
18765
|
-
var es = /*#__PURE__*/Object.freeze({
|
|
18766
|
-
__proto__: null,
|
|
18767
|
-
'default': deepmerge_1
|
|
18768
|
-
});
|
|
18769
|
-
|
|
18770
|
-
var require$$0 = /*@__PURE__*/getAugmentedNamespace(es);
|
|
18771
|
-
|
|
18772
|
-
var Action$1 = {};
|
|
18773
|
-
|
|
18774
|
-
Object.defineProperty(Action$1, "__esModule", {
|
|
18775
|
-
value: true
|
|
18776
|
-
});
|
|
18777
|
-
|
|
18778
|
-
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; }; }();
|
|
18779
|
-
|
|
18780
|
-
var _BlotFormatter$1 = requireBlotFormatter();
|
|
18781
|
-
|
|
18782
|
-
_interopRequireDefault$1(_BlotFormatter$1);
|
|
18783
|
-
|
|
18784
|
-
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18785
|
-
|
|
18786
|
-
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18787
|
-
|
|
18788
|
-
var Action = function () {
|
|
18789
|
-
function Action(formatter) {
|
|
18790
|
-
_classCallCheck$2(this, Action);
|
|
18791
|
-
|
|
18792
|
-
this.formatter = formatter;
|
|
18793
|
-
}
|
|
18794
|
-
|
|
18795
|
-
_createClass$2(Action, [{
|
|
18796
|
-
key: 'onCreate',
|
|
18797
|
-
value: function onCreate() {}
|
|
18798
|
-
}, {
|
|
18799
|
-
key: 'onDestroy',
|
|
18800
|
-
value: function onDestroy() {}
|
|
18801
|
-
}, {
|
|
18802
|
-
key: 'onUpdate',
|
|
18803
|
-
value: function onUpdate() {}
|
|
18804
|
-
}]);
|
|
18805
|
-
|
|
18806
|
-
return Action;
|
|
18807
|
-
}();
|
|
18808
|
-
|
|
18809
|
-
Action$1.default = Action;
|
|
18810
|
-
|
|
18811
|
-
var hasRequiredBlotFormatter;
|
|
18812
|
-
|
|
18813
|
-
function requireBlotFormatter () {
|
|
18814
|
-
if (hasRequiredBlotFormatter) return BlotFormatter$1;
|
|
18815
|
-
hasRequiredBlotFormatter = 1;
|
|
18816
|
-
|
|
18817
|
-
Object.defineProperty(BlotFormatter$1, "__esModule", {
|
|
18818
|
-
value: true
|
|
18819
|
-
});
|
|
18820
|
-
|
|
18821
|
-
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; }; }();
|
|
18822
|
-
|
|
18823
|
-
var _deepmerge = require$$0;
|
|
18824
|
-
|
|
18825
|
-
var _deepmerge2 = _interopRequireDefault(_deepmerge);
|
|
18826
|
-
|
|
18827
|
-
var _Options = requireOptions();
|
|
18828
|
-
|
|
18829
|
-
var _Options2 = _interopRequireDefault(_Options);
|
|
18830
|
-
|
|
18831
|
-
var _Action = Action$1;
|
|
18832
|
-
|
|
18833
|
-
_interopRequireDefault(_Action);
|
|
18834
|
-
|
|
18835
|
-
var _BlotSpec = requireBlotSpec();
|
|
18836
|
-
|
|
18837
|
-
_interopRequireDefault(_BlotSpec);
|
|
18838
|
-
|
|
18839
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18840
|
-
|
|
18841
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18842
|
-
|
|
18843
|
-
var dontMerge = function dontMerge(destination, source) {
|
|
18844
|
-
return source;
|
|
18845
|
-
};
|
|
18846
|
-
|
|
18847
|
-
var BlotFormatter = function () {
|
|
18848
|
-
function BlotFormatter(quill) {
|
|
18849
|
-
var _this = this;
|
|
18850
|
-
|
|
18851
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
18852
|
-
|
|
18853
|
-
_classCallCheck(this, BlotFormatter);
|
|
18854
|
-
|
|
18855
|
-
this.onClick = function () {
|
|
18856
|
-
_this.hide();
|
|
18857
|
-
};
|
|
18858
|
-
|
|
18859
|
-
this.quill = quill;
|
|
18860
|
-
this.options = (0, _deepmerge2.default)(_Options2.default, options, { arrayMerge: dontMerge });
|
|
18861
|
-
this.currentSpec = null;
|
|
18862
|
-
this.actions = [];
|
|
18863
|
-
this.overlay = document.createElement('div');
|
|
18864
|
-
this.overlay.classList.add(this.options.overlay.className);
|
|
18865
|
-
if (this.options.overlay.style) {
|
|
18866
|
-
Object.assign(this.overlay.style, this.options.overlay.style);
|
|
18867
|
-
}
|
|
18868
|
-
|
|
18869
|
-
// disable native image resizing on firefox
|
|
18870
|
-
document.execCommand('enableObjectResizing', false, 'false'); // eslint-disable-line no-undef
|
|
18871
|
-
this.quill.root.parentNode.style.position = this.quill.root.parentNode.style.position || 'relative';
|
|
18872
|
-
|
|
18873
|
-
this.quill.root.addEventListener('click', this.onClick);
|
|
18874
|
-
this.specs = this.options.specs.map(function (SpecClass) {
|
|
18875
|
-
return new SpecClass(_this);
|
|
18876
|
-
});
|
|
18877
|
-
this.specs.forEach(function (spec) {
|
|
18878
|
-
return spec.init();
|
|
18879
|
-
});
|
|
18880
|
-
}
|
|
18881
|
-
|
|
18882
|
-
_createClass(BlotFormatter, [{
|
|
18883
|
-
key: 'show',
|
|
18884
|
-
value: function show(spec) {
|
|
18885
|
-
this.currentSpec = spec;
|
|
18886
|
-
this.currentSpec.setSelection();
|
|
18887
|
-
this.setUserSelect('none');
|
|
18888
|
-
this.quill.root.parentNode.appendChild(this.overlay);
|
|
18889
|
-
this.repositionOverlay();
|
|
18890
|
-
this.createActions(spec);
|
|
18891
|
-
}
|
|
18892
|
-
}, {
|
|
18893
|
-
key: 'hide',
|
|
18894
|
-
value: function hide() {
|
|
18895
|
-
if (!this.currentSpec) {
|
|
18896
|
-
return;
|
|
18897
|
-
}
|
|
18898
|
-
|
|
18899
|
-
this.currentSpec.onHide();
|
|
18900
|
-
this.currentSpec = null;
|
|
18901
|
-
this.quill.root.parentNode.removeChild(this.overlay);
|
|
18902
|
-
this.overlay.style.setProperty('display', 'none');
|
|
18903
|
-
this.setUserSelect('');
|
|
18904
|
-
this.destroyActions();
|
|
18905
|
-
}
|
|
18906
|
-
}, {
|
|
18907
|
-
key: 'update',
|
|
18908
|
-
value: function update() {
|
|
18909
|
-
this.repositionOverlay();
|
|
18910
|
-
this.actions.forEach(function (action) {
|
|
18911
|
-
return action.onUpdate();
|
|
18912
|
-
});
|
|
18913
|
-
}
|
|
18914
|
-
}, {
|
|
18915
|
-
key: 'createActions',
|
|
18916
|
-
value: function createActions(spec) {
|
|
18917
|
-
var _this2 = this;
|
|
18918
|
-
|
|
18919
|
-
this.actions = spec.getActions().map(function (ActionClass) {
|
|
18920
|
-
var action = new ActionClass(_this2);
|
|
18921
|
-
action.onCreate();
|
|
18922
|
-
return action;
|
|
18923
|
-
});
|
|
18924
|
-
}
|
|
18925
|
-
}, {
|
|
18926
|
-
key: 'destroyActions',
|
|
18927
|
-
value: function destroyActions() {
|
|
18928
|
-
this.actions.forEach(function (action) {
|
|
18929
|
-
return action.onDestroy();
|
|
18930
|
-
});
|
|
18931
|
-
this.actions = [];
|
|
18932
|
-
}
|
|
18933
|
-
}, {
|
|
18934
|
-
key: 'repositionOverlay',
|
|
18935
|
-
value: function repositionOverlay() {
|
|
18936
|
-
if (!this.currentSpec) {
|
|
18937
|
-
return;
|
|
18938
|
-
}
|
|
18939
|
-
|
|
18940
|
-
var overlayTarget = this.currentSpec.getOverlayElement();
|
|
18941
|
-
if (!overlayTarget) {
|
|
18942
|
-
return;
|
|
18943
|
-
}
|
|
18944
|
-
|
|
18945
|
-
var parent = this.quill.root.parentNode;
|
|
18946
|
-
var specRect = overlayTarget.getBoundingClientRect();
|
|
18947
|
-
var parentRect = parent.getBoundingClientRect();
|
|
18948
|
-
|
|
18949
|
-
Object.assign(this.overlay.style, {
|
|
18950
|
-
display: 'block',
|
|
18951
|
-
left: specRect.left - parentRect.left - 1 + parent.scrollLeft + 'px',
|
|
18952
|
-
top: specRect.top - parentRect.top + parent.scrollTop + 'px',
|
|
18953
|
-
width: specRect.width + 'px',
|
|
18954
|
-
height: specRect.height + 'px'
|
|
18955
|
-
});
|
|
18956
|
-
}
|
|
18957
|
-
}, {
|
|
18958
|
-
key: 'setUserSelect',
|
|
18959
|
-
value: function setUserSelect(value) {
|
|
18960
|
-
var _this3 = this;
|
|
18961
|
-
|
|
18962
|
-
var props = ['userSelect', 'mozUserSelect', 'webkitUserSelect', 'msUserSelect'];
|
|
18963
|
-
|
|
18964
|
-
props.forEach(function (prop) {
|
|
18965
|
-
// set on contenteditable element and <html>
|
|
18966
|
-
_this3.quill.root.style.setProperty(prop, value);
|
|
18967
|
-
if (document.documentElement) {
|
|
18968
|
-
document.documentElement.style.setProperty(prop, value);
|
|
18969
|
-
}
|
|
18970
|
-
});
|
|
18971
|
-
}
|
|
18972
|
-
}]);
|
|
18973
|
-
|
|
18974
|
-
return BlotFormatter;
|
|
18975
|
-
}();
|
|
18976
|
-
|
|
18977
|
-
BlotFormatter$1.default = BlotFormatter;
|
|
18978
|
-
return BlotFormatter$1;
|
|
18979
|
-
}
|
|
18980
|
-
|
|
18981
|
-
var AlignAction = {};
|
|
18982
|
-
|
|
18983
|
-
var DefaultAligner$1 = {};
|
|
18984
|
-
|
|
18985
|
-
Object.defineProperty(DefaultAligner$1, "__esModule", {
|
|
18986
|
-
value: true
|
|
18987
|
-
});
|
|
18988
|
-
|
|
18989
|
-
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; }; }();
|
|
18990
|
-
|
|
18991
|
-
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; }
|
|
18992
|
-
|
|
18993
|
-
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18994
|
-
|
|
18995
|
-
var LEFT_ALIGN = 'left';
|
|
18996
|
-
var CENTER_ALIGN = 'center';
|
|
18997
|
-
var RIGHT_ALIGN = 'right';
|
|
18998
|
-
|
|
18999
|
-
var DefaultAligner = function () {
|
|
19000
|
-
function DefaultAligner(options) {
|
|
19001
|
-
var _this = this,
|
|
19002
|
-
_alignments;
|
|
19003
|
-
|
|
19004
|
-
_classCallCheck$1(this, DefaultAligner);
|
|
19005
|
-
|
|
19006
|
-
this.applyStyle = options.aligner.applyStyle;
|
|
19007
|
-
this.alignAttribute = options.attribute;
|
|
19008
|
-
this.alignments = (_alignments = {}, _defineProperty(_alignments, LEFT_ALIGN, {
|
|
19009
|
-
name: LEFT_ALIGN,
|
|
19010
|
-
icon: options.icons.left,
|
|
19011
|
-
apply: function apply(el) {
|
|
19012
|
-
_this.setAlignment(el, LEFT_ALIGN);
|
|
19013
|
-
_this.setStyle(el, 'inline', 'left', '0 1em 1em 0');
|
|
19014
|
-
}
|
|
19015
|
-
}), _defineProperty(_alignments, CENTER_ALIGN, {
|
|
19016
|
-
name: CENTER_ALIGN,
|
|
19017
|
-
icon: options.icons.center,
|
|
19018
|
-
apply: function apply(el) {
|
|
19019
|
-
_this.setAlignment(el, CENTER_ALIGN);
|
|
19020
|
-
_this.setStyle(el, 'block', null, 'auto');
|
|
19021
|
-
}
|
|
19022
|
-
}), _defineProperty(_alignments, RIGHT_ALIGN, {
|
|
19023
|
-
name: RIGHT_ALIGN,
|
|
19024
|
-
icon: options.icons.right,
|
|
19025
|
-
apply: function apply(el) {
|
|
19026
|
-
_this.setAlignment(el, RIGHT_ALIGN);
|
|
19027
|
-
_this.setStyle(el, 'inline', 'right', '0 0 1em 1em');
|
|
19028
|
-
}
|
|
19029
|
-
}), _alignments);
|
|
19030
|
-
}
|
|
19031
|
-
|
|
19032
|
-
_createClass$1(DefaultAligner, [{
|
|
19033
|
-
key: 'getAlignments',
|
|
19034
|
-
value: function getAlignments() {
|
|
19035
|
-
var _this2 = this;
|
|
19036
|
-
|
|
19037
|
-
return Object.keys(this.alignments).map(function (k) {
|
|
19038
|
-
return _this2.alignments[k];
|
|
19039
|
-
});
|
|
19040
|
-
}
|
|
19041
|
-
}, {
|
|
19042
|
-
key: 'clear',
|
|
19043
|
-
value: function clear(el) {
|
|
19044
|
-
el.removeAttribute(this.alignAttribute);
|
|
19045
|
-
this.setStyle(el, null, null, null);
|
|
19046
|
-
}
|
|
19047
|
-
}, {
|
|
19048
|
-
key: 'isAligned',
|
|
19049
|
-
value: function isAligned(el, alignment) {
|
|
19050
|
-
return el.getAttribute(this.alignAttribute) === alignment.name;
|
|
19051
|
-
}
|
|
19052
|
-
}, {
|
|
19053
|
-
key: 'setAlignment',
|
|
19054
|
-
value: function setAlignment(el, value) {
|
|
19055
|
-
el.setAttribute(this.alignAttribute, value);
|
|
19056
|
-
}
|
|
19057
|
-
}, {
|
|
19058
|
-
key: 'setStyle',
|
|
19059
|
-
value: function setStyle(el, display, float, margin) {
|
|
19060
|
-
if (this.applyStyle) {
|
|
19061
|
-
el.style.setProperty('display', display);
|
|
19062
|
-
el.style.setProperty('float', float);
|
|
19063
|
-
el.style.setProperty('margin', margin);
|
|
19064
|
-
}
|
|
19065
|
-
}
|
|
19066
|
-
}]);
|
|
19067
|
-
|
|
19068
|
-
return DefaultAligner;
|
|
19069
|
-
}();
|
|
19070
|
-
|
|
19071
|
-
DefaultAligner$1.default = DefaultAligner;
|
|
19072
|
-
|
|
19073
|
-
var Toolbar = {};
|
|
19074
|
-
|
|
19075
|
-
var hasRequiredToolbar;
|
|
19076
|
-
|
|
19077
|
-
function requireToolbar () {
|
|
19078
|
-
if (hasRequiredToolbar) return Toolbar;
|
|
19079
|
-
hasRequiredToolbar = 1;
|
|
19080
|
-
|
|
19081
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19082
|
-
|
|
19083
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19084
|
-
|
|
19085
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19086
|
-
return Toolbar;
|
|
19087
|
-
}
|
|
19088
|
-
|
|
19089
|
-
var DefaultToolbar = {};
|
|
19090
|
-
|
|
19091
|
-
var hasRequiredDefaultToolbar;
|
|
19092
|
-
|
|
19093
|
-
function requireDefaultToolbar () {
|
|
19094
|
-
if (hasRequiredDefaultToolbar) return DefaultToolbar;
|
|
19095
|
-
hasRequiredDefaultToolbar = 1;
|
|
19096
|
-
|
|
19097
|
-
Object.defineProperty(DefaultToolbar, "__esModule", {
|
|
19098
|
-
value: true
|
|
19099
|
-
});
|
|
19100
|
-
|
|
19101
|
-
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; }; }();
|
|
19102
|
-
|
|
19103
|
-
requireToolbar();
|
|
19104
|
-
|
|
19105
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19106
|
-
|
|
19107
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19108
|
-
|
|
19109
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19110
|
-
|
|
19111
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19112
|
-
|
|
19113
|
-
var DefaultToolbar$1 = function () {
|
|
19114
|
-
function DefaultToolbar() {
|
|
19115
|
-
_classCallCheck(this, DefaultToolbar);
|
|
19116
|
-
|
|
19117
|
-
this.toolbar = null;
|
|
19118
|
-
this.buttons = [];
|
|
19119
|
-
}
|
|
19120
|
-
|
|
19121
|
-
_createClass(DefaultToolbar, [{
|
|
19122
|
-
key: 'create',
|
|
19123
|
-
value: function create(formatter, aligner) {
|
|
19124
|
-
var toolbar = document.createElement('div');
|
|
19125
|
-
toolbar.classList.add(formatter.options.align.toolbar.mainClassName);
|
|
19126
|
-
this.addToolbarStyle(formatter, toolbar);
|
|
19127
|
-
this.addButtons(formatter, toolbar, aligner);
|
|
19128
|
-
|
|
19129
|
-
this.toolbar = toolbar;
|
|
19130
|
-
return this.toolbar;
|
|
19131
|
-
}
|
|
19132
|
-
}, {
|
|
19133
|
-
key: 'destroy',
|
|
19134
|
-
value: function destroy() {
|
|
19135
|
-
this.toolbar = null;
|
|
19136
|
-
this.buttons = [];
|
|
19137
|
-
}
|
|
19138
|
-
}, {
|
|
19139
|
-
key: 'getElement',
|
|
19140
|
-
value: function getElement() {
|
|
19141
|
-
return this.toolbar;
|
|
19142
|
-
}
|
|
19143
|
-
}, {
|
|
19144
|
-
key: 'addToolbarStyle',
|
|
19145
|
-
value: function addToolbarStyle(formatter, toolbar) {
|
|
19146
|
-
if (formatter.options.align.toolbar.mainStyle) {
|
|
19147
|
-
Object.assign(toolbar.style, formatter.options.align.toolbar.mainStyle);
|
|
19148
|
-
}
|
|
19149
|
-
}
|
|
19150
|
-
}, {
|
|
19151
|
-
key: 'addButtonStyle',
|
|
19152
|
-
value: function addButtonStyle(button, index, formatter) {
|
|
19153
|
-
if (formatter.options.align.toolbar.buttonStyle) {
|
|
19154
|
-
Object.assign(button.style, formatter.options.align.toolbar.buttonStyle);
|
|
19155
|
-
if (index > 0) {
|
|
19156
|
-
button.style.borderLeftWidth = '0'; // eslint-disable-line no-param-reassign
|
|
19157
|
-
}
|
|
19158
|
-
}
|
|
19159
|
-
|
|
19160
|
-
if (formatter.options.align.toolbar.svgStyle) {
|
|
19161
|
-
Object.assign(button.children[0].style, formatter.options.align.toolbar.svgStyle);
|
|
19162
|
-
}
|
|
19163
|
-
}
|
|
19164
|
-
}, {
|
|
19165
|
-
key: 'addButtons',
|
|
19166
|
-
value: function addButtons(formatter, toolbar, aligner) {
|
|
19167
|
-
var _this = this;
|
|
19168
|
-
|
|
19169
|
-
aligner.getAlignments().forEach(function (alignment, i) {
|
|
19170
|
-
var button = document.createElement('span');
|
|
19171
|
-
button.classList.add(formatter.options.align.toolbar.buttonClassName);
|
|
19172
|
-
button.innerHTML = alignment.icon;
|
|
19173
|
-
button.addEventListener('click', function () {
|
|
19174
|
-
_this.onButtonClick(button, formatter, alignment, aligner);
|
|
19175
|
-
});
|
|
19176
|
-
_this.preselectButton(button, alignment, formatter, aligner);
|
|
19177
|
-
_this.addButtonStyle(button, i, formatter);
|
|
19178
|
-
_this.buttons.push(button);
|
|
19179
|
-
toolbar.appendChild(button);
|
|
19180
|
-
});
|
|
19181
|
-
}
|
|
19182
|
-
}, {
|
|
19183
|
-
key: 'preselectButton',
|
|
19184
|
-
value: function preselectButton(button, alignment, formatter, aligner) {
|
|
19185
|
-
if (!formatter.currentSpec) {
|
|
19186
|
-
return;
|
|
19187
|
-
}
|
|
19188
|
-
|
|
19189
|
-
var target = formatter.currentSpec.getTargetElement();
|
|
19190
|
-
if (!target) {
|
|
19191
|
-
return;
|
|
19192
|
-
}
|
|
19193
|
-
|
|
19194
|
-
if (aligner.isAligned(target, alignment)) {
|
|
19195
|
-
this.selectButton(formatter, button);
|
|
19196
|
-
}
|
|
19197
|
-
}
|
|
19198
|
-
}, {
|
|
19199
|
-
key: 'onButtonClick',
|
|
19200
|
-
value: function onButtonClick(button, formatter, alignment, aligner) {
|
|
19201
|
-
if (!formatter.currentSpec) {
|
|
19202
|
-
return;
|
|
19203
|
-
}
|
|
19204
|
-
|
|
19205
|
-
var target = formatter.currentSpec.getTargetElement();
|
|
19206
|
-
if (!target) {
|
|
19207
|
-
return;
|
|
19208
|
-
}
|
|
19209
|
-
|
|
19210
|
-
this.clickButton(button, target, formatter, alignment, aligner);
|
|
19211
|
-
}
|
|
19212
|
-
}, {
|
|
19213
|
-
key: 'clickButton',
|
|
19214
|
-
value: function clickButton(button, alignTarget, formatter, alignment, aligner) {
|
|
19215
|
-
var _this2 = this;
|
|
19216
|
-
|
|
19217
|
-
this.buttons.forEach(function (b) {
|
|
19218
|
-
_this2.deselectButton(formatter, b);
|
|
19219
|
-
});
|
|
19220
|
-
if (aligner.isAligned(alignTarget, alignment)) {
|
|
19221
|
-
if (formatter.options.align.toolbar.allowDeselect) {
|
|
19222
|
-
aligner.clear(alignTarget);
|
|
19223
|
-
} else {
|
|
19224
|
-
this.selectButton(formatter, button);
|
|
19225
|
-
}
|
|
19226
|
-
} else {
|
|
19227
|
-
this.selectButton(formatter, button);
|
|
19228
|
-
alignment.apply(alignTarget);
|
|
19229
|
-
}
|
|
19230
|
-
|
|
19231
|
-
formatter.update();
|
|
19232
|
-
}
|
|
19233
|
-
}, {
|
|
19234
|
-
key: 'selectButton',
|
|
19235
|
-
value: function selectButton(formatter, button) {
|
|
19236
|
-
button.classList.add('is-selected');
|
|
19237
|
-
if (formatter.options.align.toolbar.addButtonSelectStyle) {
|
|
19238
|
-
button.style.setProperty('filter', 'invert(20%)');
|
|
19239
|
-
}
|
|
19240
|
-
}
|
|
19241
|
-
}, {
|
|
19242
|
-
key: 'deselectButton',
|
|
19243
|
-
value: function deselectButton(formatter, button) {
|
|
19244
|
-
button.classList.remove('is-selected');
|
|
19245
|
-
if (formatter.options.align.toolbar.addButtonSelectStyle) {
|
|
19246
|
-
button.style.removeProperty('filter');
|
|
19247
|
-
}
|
|
19248
|
-
}
|
|
19249
|
-
}]);
|
|
19250
|
-
|
|
19251
|
-
return DefaultToolbar;
|
|
19252
|
-
}();
|
|
19253
|
-
|
|
19254
|
-
DefaultToolbar.default = DefaultToolbar$1;
|
|
19255
|
-
return DefaultToolbar;
|
|
19256
|
-
}
|
|
19257
|
-
|
|
19258
|
-
var hasRequiredAlignAction;
|
|
19259
|
-
|
|
19260
|
-
function requireAlignAction () {
|
|
19261
|
-
if (hasRequiredAlignAction) return AlignAction;
|
|
19262
|
-
hasRequiredAlignAction = 1;
|
|
19263
|
-
|
|
19264
|
-
Object.defineProperty(AlignAction, "__esModule", {
|
|
19265
|
-
value: true
|
|
19266
|
-
});
|
|
19267
|
-
|
|
19268
|
-
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; }; }();
|
|
19269
|
-
|
|
19270
|
-
var _Action2 = Action$1;
|
|
19271
|
-
|
|
19272
|
-
var _Action3 = _interopRequireDefault(_Action2);
|
|
19273
|
-
|
|
19274
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19275
|
-
|
|
19276
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19277
|
-
|
|
19278
|
-
var _DefaultAligner = DefaultAligner$1;
|
|
19279
|
-
|
|
19280
|
-
var _DefaultAligner2 = _interopRequireDefault(_DefaultAligner);
|
|
19281
|
-
|
|
19282
|
-
requireToolbar();
|
|
19283
|
-
|
|
19284
|
-
var _DefaultToolbar = requireDefaultToolbar();
|
|
19285
|
-
|
|
19286
|
-
var _DefaultToolbar2 = _interopRequireDefault(_DefaultToolbar);
|
|
19287
|
-
|
|
19288
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19289
|
-
|
|
19290
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19291
|
-
|
|
19292
|
-
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; }
|
|
19293
|
-
|
|
19294
|
-
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; }
|
|
19295
|
-
|
|
19296
|
-
var AlignAction$1 = function (_Action) {
|
|
19297
|
-
_inherits(AlignAction, _Action);
|
|
19298
|
-
|
|
19299
|
-
function AlignAction(formatter) {
|
|
19300
|
-
_classCallCheck(this, AlignAction);
|
|
19301
|
-
|
|
19302
|
-
var _this = _possibleConstructorReturn(this, (AlignAction.__proto__ || Object.getPrototypeOf(AlignAction)).call(this, formatter));
|
|
19303
|
-
|
|
19304
|
-
_this.aligner = new _DefaultAligner2.default(formatter.options.align);
|
|
19305
|
-
_this.toolbar = new _DefaultToolbar2.default();
|
|
19306
|
-
return _this;
|
|
19307
|
-
}
|
|
19308
|
-
|
|
19309
|
-
_createClass(AlignAction, [{
|
|
19310
|
-
key: 'onCreate',
|
|
19311
|
-
value: function onCreate() {
|
|
19312
|
-
var toolbar = this.toolbar.create(this.formatter, this.aligner);
|
|
19313
|
-
this.formatter.overlay.appendChild(toolbar);
|
|
19314
|
-
}
|
|
19315
|
-
}, {
|
|
19316
|
-
key: 'onDestroy',
|
|
19317
|
-
value: function onDestroy() {
|
|
19318
|
-
var toolbar = this.toolbar.getElement();
|
|
19319
|
-
if (!toolbar) {
|
|
19320
|
-
return;
|
|
19321
|
-
}
|
|
19322
|
-
|
|
19323
|
-
this.formatter.overlay.removeChild(toolbar);
|
|
19324
|
-
this.toolbar.destroy();
|
|
19325
|
-
}
|
|
19326
|
-
}]);
|
|
19327
|
-
|
|
19328
|
-
return AlignAction;
|
|
19329
|
-
}(_Action3.default);
|
|
19330
|
-
|
|
19331
|
-
AlignAction.default = AlignAction$1;
|
|
19332
|
-
return AlignAction;
|
|
19333
|
-
}
|
|
19334
|
-
|
|
19335
|
-
var ResizeAction = {};
|
|
19336
|
-
|
|
19337
|
-
var hasRequiredResizeAction;
|
|
19338
|
-
|
|
19339
|
-
function requireResizeAction () {
|
|
19340
|
-
if (hasRequiredResizeAction) return ResizeAction;
|
|
19341
|
-
hasRequiredResizeAction = 1;
|
|
19342
|
-
|
|
19343
|
-
Object.defineProperty(ResizeAction, "__esModule", {
|
|
19344
|
-
value: true
|
|
19345
|
-
});
|
|
19346
|
-
|
|
19347
|
-
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; }; }();
|
|
19348
|
-
|
|
19349
|
-
var _Action2 = Action$1;
|
|
19350
|
-
|
|
19351
|
-
var _Action3 = _interopRequireDefault(_Action2);
|
|
19352
|
-
|
|
19353
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19354
|
-
|
|
19355
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19356
|
-
|
|
19357
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19358
|
-
|
|
19359
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19360
|
-
|
|
19361
|
-
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; }
|
|
19362
|
-
|
|
19363
|
-
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; }
|
|
19364
|
-
|
|
19365
|
-
var ResizeAction$1 = function (_Action) {
|
|
19366
|
-
_inherits(ResizeAction, _Action);
|
|
19367
|
-
|
|
19368
|
-
function ResizeAction(formatter) {
|
|
19369
|
-
_classCallCheck(this, ResizeAction);
|
|
19370
|
-
|
|
19371
|
-
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19372
|
-
|
|
19373
|
-
_this.onMouseDown = function (event) {
|
|
19374
|
-
if (!(event.target instanceof HTMLElement)) {
|
|
19375
|
-
return;
|
|
19376
|
-
}
|
|
19377
|
-
_this.dragHandle = event.target;
|
|
19378
|
-
_this.setCursor(_this.dragHandle.style.cursor);
|
|
19379
|
-
|
|
19380
|
-
if (!_this.formatter.currentSpec) {
|
|
19381
|
-
return;
|
|
19382
|
-
}
|
|
19383
|
-
|
|
19384
|
-
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19385
|
-
if (!target) {
|
|
19386
|
-
return;
|
|
19387
|
-
}
|
|
19388
|
-
|
|
19389
|
-
var rect = target.getBoundingClientRect();
|
|
19390
|
-
|
|
19391
|
-
_this.dragStartX = event.clientX;
|
|
19392
|
-
_this.preDragWidth = rect.width;
|
|
19393
|
-
_this.targetRatio = rect.height / rect.width;
|
|
19394
|
-
|
|
19395
|
-
document.addEventListener('mousemove', _this.onDrag);
|
|
19396
|
-
document.addEventListener('mouseup', _this.onMouseUp);
|
|
19397
|
-
};
|
|
19398
|
-
|
|
19399
|
-
_this.onDrag = function (event) {
|
|
19400
|
-
if (!_this.formatter.currentSpec) {
|
|
19401
|
-
return;
|
|
19402
|
-
}
|
|
19403
|
-
|
|
19404
|
-
var target = _this.formatter.currentSpec.getTargetElement();
|
|
19405
|
-
if (!target) {
|
|
19406
|
-
return;
|
|
19407
|
-
}
|
|
19408
|
-
|
|
19409
|
-
var deltaX = event.clientX - _this.dragStartX;
|
|
19410
|
-
var newWidth = 0;
|
|
19411
|
-
|
|
19412
|
-
if (_this.dragHandle === _this.topLeftHandle || _this.dragHandle === _this.bottomLeftHandle) {
|
|
19413
|
-
newWidth = Math.round(_this.preDragWidth - deltaX);
|
|
19414
|
-
} else {
|
|
19415
|
-
newWidth = Math.round(_this.preDragWidth + deltaX);
|
|
19416
|
-
}
|
|
19417
|
-
|
|
19418
|
-
var newHeight = _this.targetRatio * newWidth;
|
|
19419
|
-
|
|
19420
|
-
target.setAttribute('width', '' + newWidth);
|
|
19421
|
-
target.setAttribute('height', '' + newHeight);
|
|
19422
|
-
|
|
19423
|
-
_this.formatter.update();
|
|
19424
|
-
};
|
|
19425
|
-
|
|
19426
|
-
_this.onMouseUp = function () {
|
|
19427
|
-
_this.setCursor('');
|
|
19428
|
-
document.removeEventListener('mousemove', _this.onDrag);
|
|
19429
|
-
document.removeEventListener('mouseup', _this.onMouseUp);
|
|
19430
|
-
};
|
|
19431
|
-
|
|
19432
|
-
_this.topLeftHandle = _this.createHandle('top-left', 'nwse-resize');
|
|
19433
|
-
_this.topRightHandle = _this.createHandle('top-right', 'nesw-resize');
|
|
19434
|
-
_this.bottomRightHandle = _this.createHandle('bottom-right', 'nwse-resize');
|
|
19435
|
-
_this.bottomLeftHandle = _this.createHandle('bottom-left', 'nesw-resize');
|
|
19436
|
-
_this.dragHandle = null;
|
|
19437
|
-
_this.dragStartX = 0;
|
|
19438
|
-
_this.preDragWidth = 0;
|
|
19439
|
-
_this.targetRatio = 0;
|
|
19440
|
-
return _this;
|
|
19441
|
-
}
|
|
19442
|
-
|
|
19443
|
-
_createClass(ResizeAction, [{
|
|
19444
|
-
key: 'onCreate',
|
|
19445
|
-
value: function onCreate() {
|
|
19446
|
-
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
19447
|
-
this.formatter.overlay.appendChild(this.topRightHandle);
|
|
19448
|
-
this.formatter.overlay.appendChild(this.bottomRightHandle);
|
|
19449
|
-
this.formatter.overlay.appendChild(this.bottomLeftHandle);
|
|
19450
|
-
|
|
19451
|
-
this.repositionHandles(this.formatter.options.resize.handleStyle);
|
|
19452
|
-
}
|
|
19453
|
-
}, {
|
|
19454
|
-
key: 'onDestroy',
|
|
19455
|
-
value: function onDestroy() {
|
|
19456
|
-
this.setCursor('');
|
|
19457
|
-
this.formatter.overlay.removeChild(this.topLeftHandle);
|
|
19458
|
-
this.formatter.overlay.removeChild(this.topRightHandle);
|
|
19459
|
-
this.formatter.overlay.removeChild(this.bottomRightHandle);
|
|
19460
|
-
this.formatter.overlay.removeChild(this.bottomLeftHandle);
|
|
19461
|
-
}
|
|
19462
|
-
}, {
|
|
19463
|
-
key: 'createHandle',
|
|
19464
|
-
value: function createHandle(position, cursor) {
|
|
19465
|
-
var box = document.createElement('div');
|
|
19466
|
-
box.classList.add(this.formatter.options.resize.handleClassName);
|
|
19467
|
-
box.setAttribute('data-position', position);
|
|
19468
|
-
box.style.cursor = cursor;
|
|
19469
|
-
|
|
19470
|
-
if (this.formatter.options.resize.handleStyle) {
|
|
19471
|
-
Object.assign(box.style, this.formatter.options.resize.handleStyle);
|
|
19472
|
-
}
|
|
19473
|
-
|
|
19474
|
-
box.addEventListener('mousedown', this.onMouseDown);
|
|
19475
|
-
|
|
19476
|
-
return box;
|
|
19477
|
-
}
|
|
19478
|
-
}, {
|
|
19479
|
-
key: 'repositionHandles',
|
|
19480
|
-
value: function repositionHandles(handleStyle) {
|
|
19481
|
-
var handleXOffset = '0px';
|
|
19482
|
-
var handleYOffset = '0px';
|
|
19483
|
-
if (handleStyle) {
|
|
19484
|
-
if (handleStyle.width) {
|
|
19485
|
-
handleXOffset = -parseFloat(handleStyle.width) / 2 + 'px';
|
|
19486
|
-
}
|
|
19487
|
-
if (handleStyle.height) {
|
|
19488
|
-
handleYOffset = -parseFloat(handleStyle.height) / 2 + 'px';
|
|
19489
|
-
}
|
|
19490
|
-
}
|
|
19491
|
-
|
|
19492
|
-
Object.assign(this.topLeftHandle.style, { left: handleXOffset, top: handleYOffset });
|
|
19493
|
-
Object.assign(this.topRightHandle.style, { right: handleXOffset, top: handleYOffset });
|
|
19494
|
-
Object.assign(this.bottomRightHandle.style, { right: handleXOffset, bottom: handleYOffset });
|
|
19495
|
-
Object.assign(this.bottomLeftHandle.style, { left: handleXOffset, bottom: handleYOffset });
|
|
19496
|
-
}
|
|
19497
|
-
}, {
|
|
19498
|
-
key: 'setCursor',
|
|
19499
|
-
value: function setCursor(value) {
|
|
19500
|
-
if (document.body) {
|
|
19501
|
-
document.body.style.cursor = value;
|
|
19502
|
-
}
|
|
19503
|
-
|
|
19504
|
-
if (this.formatter.currentSpec) {
|
|
19505
|
-
var target = this.formatter.currentSpec.getOverlayElement();
|
|
19506
|
-
if (target) {
|
|
19507
|
-
target.style.cursor = value;
|
|
19508
|
-
}
|
|
19509
|
-
}
|
|
19510
|
-
}
|
|
19511
|
-
}]);
|
|
19512
|
-
|
|
19513
|
-
return ResizeAction;
|
|
19514
|
-
}(_Action3.default);
|
|
19515
|
-
|
|
19516
|
-
ResizeAction.default = ResizeAction$1;
|
|
19517
|
-
return ResizeAction;
|
|
19518
|
-
}
|
|
19519
|
-
|
|
19520
|
-
var DeleteAction = {};
|
|
19521
|
-
|
|
19522
|
-
var hasRequiredDeleteAction;
|
|
19523
|
-
|
|
19524
|
-
function requireDeleteAction () {
|
|
19525
|
-
if (hasRequiredDeleteAction) return DeleteAction;
|
|
19526
|
-
hasRequiredDeleteAction = 1;
|
|
19527
|
-
|
|
19528
|
-
Object.defineProperty(DeleteAction, "__esModule", {
|
|
19529
|
-
value: true
|
|
19530
|
-
});
|
|
19531
|
-
|
|
19532
|
-
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; }; }();
|
|
19533
|
-
|
|
19534
|
-
var _quill = quill.exports;
|
|
19535
|
-
|
|
19536
|
-
var _quill2 = _interopRequireDefault(_quill);
|
|
19537
|
-
|
|
19538
|
-
var _Action2 = Action$1;
|
|
19539
|
-
|
|
19540
|
-
var _Action3 = _interopRequireDefault(_Action2);
|
|
19541
|
-
|
|
19542
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19543
|
-
|
|
19544
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19545
|
-
|
|
19546
|
-
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; }
|
|
19547
|
-
|
|
19548
|
-
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; }
|
|
19549
|
-
|
|
19550
|
-
var DeleteAction$1 = function (_Action) {
|
|
19551
|
-
_inherits(DeleteAction, _Action);
|
|
19552
|
-
|
|
19553
|
-
function DeleteAction() {
|
|
19554
|
-
var _ref;
|
|
19555
|
-
|
|
19556
|
-
var _temp, _this, _ret;
|
|
19557
|
-
|
|
19558
|
-
_classCallCheck(this, DeleteAction);
|
|
19559
|
-
|
|
19560
|
-
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
19561
|
-
args[_key] = arguments[_key];
|
|
19562
|
-
}
|
|
19563
|
-
|
|
19564
|
-
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = DeleteAction.__proto__ || Object.getPrototypeOf(DeleteAction)).call.apply(_ref, [this].concat(args))), _this), _this.onKeyUp = function (e) {
|
|
19565
|
-
if (!_this.formatter.currentSpec) {
|
|
19566
|
-
return;
|
|
19567
|
-
}
|
|
19568
|
-
|
|
19569
|
-
// delete or backspace
|
|
19570
|
-
if (e.keyCode === 46 || e.keyCode === 8) {
|
|
19571
|
-
var blot = _quill2.default.find(_this.formatter.currentSpec.getTargetElement());
|
|
19572
|
-
if (blot) {
|
|
19573
|
-
blot.deleteAt(0);
|
|
19574
|
-
}
|
|
19575
|
-
_this.formatter.hide();
|
|
19576
|
-
}
|
|
19577
|
-
}, _temp), _possibleConstructorReturn(_this, _ret);
|
|
19578
|
-
}
|
|
19579
|
-
|
|
19580
|
-
_createClass(DeleteAction, [{
|
|
19581
|
-
key: 'onCreate',
|
|
19582
|
-
value: function onCreate() {
|
|
19583
|
-
document.addEventListener('keyup', this.onKeyUp, true);
|
|
19584
|
-
this.formatter.quill.root.addEventListener('input', this.onKeyUp, true);
|
|
19585
|
-
}
|
|
19586
|
-
}, {
|
|
19587
|
-
key: 'onDestroy',
|
|
19588
|
-
value: function onDestroy() {
|
|
19589
|
-
document.removeEventListener('keyup', this.onKeyUp);
|
|
19590
|
-
this.formatter.quill.root.removeEventListener('input', this.onKeyUp);
|
|
19591
|
-
}
|
|
19592
|
-
}]);
|
|
19593
|
-
|
|
19594
|
-
return DeleteAction;
|
|
19595
|
-
}(_Action3.default);
|
|
19596
|
-
|
|
19597
|
-
DeleteAction.default = DeleteAction$1;
|
|
19598
|
-
return DeleteAction;
|
|
19599
|
-
}
|
|
19600
|
-
|
|
19601
|
-
var hasRequiredBlotSpec;
|
|
19602
|
-
|
|
19603
|
-
function requireBlotSpec () {
|
|
19604
|
-
if (hasRequiredBlotSpec) return BlotSpec;
|
|
19605
|
-
hasRequiredBlotSpec = 1;
|
|
19606
|
-
|
|
19607
|
-
Object.defineProperty(BlotSpec, "__esModule", {
|
|
19608
|
-
value: true
|
|
19609
|
-
});
|
|
19610
|
-
|
|
19611
|
-
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; }; }();
|
|
19612
|
-
|
|
19613
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19614
|
-
|
|
19615
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19616
|
-
|
|
19617
|
-
var _Action = Action$1;
|
|
19618
|
-
|
|
19619
|
-
_interopRequireDefault(_Action);
|
|
19620
|
-
|
|
19621
|
-
var _AlignAction = requireAlignAction();
|
|
19622
|
-
|
|
19623
|
-
var _AlignAction2 = _interopRequireDefault(_AlignAction);
|
|
19624
|
-
|
|
19625
|
-
var _ResizeAction = requireResizeAction();
|
|
19626
|
-
|
|
19627
|
-
var _ResizeAction2 = _interopRequireDefault(_ResizeAction);
|
|
19628
|
-
|
|
19629
|
-
var _DeleteAction = requireDeleteAction();
|
|
19630
|
-
|
|
19631
|
-
var _DeleteAction2 = _interopRequireDefault(_DeleteAction);
|
|
19632
|
-
|
|
19633
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19634
|
-
|
|
19635
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19636
|
-
|
|
19637
|
-
var BlotSpec$1 = function () {
|
|
19638
|
-
function BlotSpec(formatter) {
|
|
19639
|
-
_classCallCheck(this, BlotSpec);
|
|
19640
|
-
|
|
19641
|
-
this.formatter = formatter;
|
|
19642
|
-
}
|
|
19643
|
-
|
|
19644
|
-
_createClass(BlotSpec, [{
|
|
19645
|
-
key: 'init',
|
|
19646
|
-
value: function init() {}
|
|
19647
|
-
}, {
|
|
19648
|
-
key: 'getActions',
|
|
19649
|
-
value: function getActions() {
|
|
19650
|
-
return [_AlignAction2.default, _ResizeAction2.default, _DeleteAction2.default];
|
|
19651
|
-
}
|
|
19652
|
-
}, {
|
|
19653
|
-
key: 'getTargetElement',
|
|
19654
|
-
value: function getTargetElement() {
|
|
19655
|
-
return null;
|
|
19656
|
-
}
|
|
19657
|
-
}, {
|
|
19658
|
-
key: 'getOverlayElement',
|
|
19659
|
-
value: function getOverlayElement() {
|
|
19660
|
-
return this.getTargetElement();
|
|
19661
|
-
}
|
|
19662
|
-
}, {
|
|
19663
|
-
key: 'setSelection',
|
|
19664
|
-
value: function setSelection() {
|
|
19665
|
-
this.formatter.quill.setSelection(null);
|
|
19666
|
-
}
|
|
19667
|
-
}, {
|
|
19668
|
-
key: 'onHide',
|
|
19669
|
-
value: function onHide() {}
|
|
19670
|
-
}]);
|
|
19671
|
-
|
|
19672
|
-
return BlotSpec;
|
|
19673
|
-
}();
|
|
19674
|
-
|
|
19675
|
-
BlotSpec.default = BlotSpec$1;
|
|
19676
|
-
return BlotSpec;
|
|
19677
|
-
}
|
|
19678
|
-
|
|
19679
|
-
var ImageSpec = {};
|
|
19680
|
-
|
|
19681
|
-
var hasRequiredImageSpec;
|
|
19682
|
-
|
|
19683
|
-
function requireImageSpec () {
|
|
19684
|
-
if (hasRequiredImageSpec) return ImageSpec;
|
|
19685
|
-
hasRequiredImageSpec = 1;
|
|
19686
|
-
|
|
19687
|
-
Object.defineProperty(ImageSpec, "__esModule", {
|
|
19688
|
-
value: true
|
|
19689
|
-
});
|
|
19690
|
-
|
|
19691
|
-
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; }; }();
|
|
19692
|
-
|
|
19693
|
-
var _BlotSpec2 = requireBlotSpec();
|
|
19694
|
-
|
|
19695
|
-
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19696
|
-
|
|
19697
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19698
|
-
|
|
19699
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19700
|
-
|
|
19701
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19702
|
-
|
|
19703
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19704
|
-
|
|
19705
|
-
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; }
|
|
19706
|
-
|
|
19707
|
-
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; }
|
|
19708
|
-
|
|
19709
|
-
var ImageSpec$1 = function (_BlotSpec) {
|
|
19710
|
-
_inherits(ImageSpec, _BlotSpec);
|
|
19711
|
-
|
|
19712
|
-
function ImageSpec(formatter) {
|
|
19713
|
-
_classCallCheck(this, ImageSpec);
|
|
19714
|
-
|
|
19715
|
-
var _this = _possibleConstructorReturn(this, (ImageSpec.__proto__ || Object.getPrototypeOf(ImageSpec)).call(this, formatter));
|
|
19716
|
-
|
|
19717
|
-
_this.onClick = function (event) {
|
|
19718
|
-
var el = event.target;
|
|
19719
|
-
if (!(el instanceof HTMLElement) || el.tagName !== 'IMG') {
|
|
19720
|
-
return;
|
|
19721
|
-
}
|
|
19722
|
-
|
|
19723
|
-
_this.img = el;
|
|
19724
|
-
_this.formatter.show(_this);
|
|
19725
|
-
};
|
|
19726
|
-
|
|
19727
|
-
_this.img = null;
|
|
19728
|
-
return _this;
|
|
19729
|
-
}
|
|
19730
|
-
|
|
19731
|
-
_createClass(ImageSpec, [{
|
|
19732
|
-
key: 'init',
|
|
19733
|
-
value: function init() {
|
|
19734
|
-
this.formatter.quill.root.addEventListener('click', this.onClick);
|
|
19735
|
-
}
|
|
19736
|
-
}, {
|
|
19737
|
-
key: 'getTargetElement',
|
|
19738
|
-
value: function getTargetElement() {
|
|
19739
|
-
return this.img;
|
|
19740
|
-
}
|
|
19741
|
-
}, {
|
|
19742
|
-
key: 'onHide',
|
|
19743
|
-
value: function onHide() {
|
|
19744
|
-
this.img = null;
|
|
19745
|
-
}
|
|
19746
|
-
}]);
|
|
19747
|
-
|
|
19748
|
-
return ImageSpec;
|
|
19749
|
-
}(_BlotSpec3.default);
|
|
19750
|
-
|
|
19751
|
-
ImageSpec.default = ImageSpec$1;
|
|
19752
|
-
return ImageSpec;
|
|
19753
|
-
}
|
|
19754
|
-
|
|
19755
|
-
var IframeVideoSpec = {};
|
|
19756
|
-
|
|
19757
|
-
var UnclickableBlotSpec$1 = {};
|
|
19758
|
-
|
|
19759
|
-
Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
|
|
19760
|
-
value: true
|
|
19761
|
-
});
|
|
19762
|
-
|
|
19763
|
-
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; }; }();
|
|
19764
|
-
|
|
19765
|
-
var _BlotSpec2 = requireBlotSpec();
|
|
19766
|
-
|
|
19767
|
-
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19768
|
-
|
|
19769
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19770
|
-
|
|
19771
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19772
|
-
|
|
19773
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19774
|
-
|
|
19775
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19776
|
-
|
|
19777
|
-
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; }
|
|
19778
|
-
|
|
19779
|
-
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; }
|
|
19780
|
-
|
|
19781
|
-
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19782
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19783
|
-
|
|
19784
|
-
var UnclickableBlotSpec = function (_BlotSpec) {
|
|
19785
|
-
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19786
|
-
|
|
19787
|
-
function UnclickableBlotSpec(formatter, selector) {
|
|
19788
|
-
_classCallCheck(this, UnclickableBlotSpec);
|
|
19789
|
-
|
|
19790
|
-
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19791
|
-
|
|
19792
|
-
_this.onTextChange = function () {
|
|
19793
|
-
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19794
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19795
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19796
|
-
});
|
|
19797
|
-
};
|
|
19798
|
-
|
|
19799
|
-
_this.onMouseEnter = function (event) {
|
|
19800
|
-
var unclickable = event.target;
|
|
19801
|
-
if (!(unclickable instanceof HTMLElement)) {
|
|
19802
|
-
return;
|
|
19803
|
-
}
|
|
19804
|
-
|
|
19805
|
-
_this.nextUnclickable = unclickable;
|
|
19806
|
-
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19807
|
-
};
|
|
19808
|
-
|
|
19809
|
-
_this.onProxyImageClick = function () {
|
|
19810
|
-
_this.unclickable = _this.nextUnclickable;
|
|
19811
|
-
_this.nextUnclickable = null;
|
|
19812
|
-
_this.formatter.show(_this);
|
|
19813
|
-
_this.hideProxyImage();
|
|
19814
|
-
};
|
|
19815
|
-
|
|
19816
|
-
_this.selector = selector;
|
|
19817
|
-
_this.unclickable = null;
|
|
19818
|
-
_this.nextUnclickable = null;
|
|
19819
|
-
return _this;
|
|
19820
|
-
}
|
|
19821
|
-
|
|
19822
|
-
_createClass(UnclickableBlotSpec, [{
|
|
19823
|
-
key: 'init',
|
|
19824
|
-
value: function init() {
|
|
19825
|
-
if (document.body) {
|
|
19826
|
-
/*
|
|
19827
|
-
it's important that this is attached to the body instead of the root quill element.
|
|
19828
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19829
|
-
*/
|
|
19830
|
-
document.body.appendChild(this.createProxyImage());
|
|
19831
|
-
}
|
|
19832
|
-
|
|
19833
|
-
this.hideProxyImage();
|
|
19834
|
-
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19835
|
-
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19836
|
-
}
|
|
19837
|
-
}, {
|
|
19838
|
-
key: 'getTargetElement',
|
|
19839
|
-
value: function getTargetElement() {
|
|
19840
|
-
return this.unclickable;
|
|
19841
|
-
}
|
|
19842
|
-
}, {
|
|
19843
|
-
key: 'getOverlayElement',
|
|
19844
|
-
value: function getOverlayElement() {
|
|
19845
|
-
return this.unclickable;
|
|
19846
|
-
}
|
|
19847
|
-
}, {
|
|
19848
|
-
key: 'onHide',
|
|
19849
|
-
value: function onHide() {
|
|
19850
|
-
this.hideProxyImage();
|
|
19851
|
-
this.nextUnclickable = null;
|
|
19852
|
-
this.unclickable = null;
|
|
19853
|
-
}
|
|
19854
|
-
}, {
|
|
19855
|
-
key: 'createProxyImage',
|
|
19856
|
-
value: function createProxyImage() {
|
|
19857
|
-
var canvas = document.createElement('canvas');
|
|
19858
|
-
var context = canvas.getContext('2d');
|
|
19859
|
-
context.globalAlpha = 0;
|
|
19860
|
-
context.fillRect(0, 0, 1, 1);
|
|
19861
|
-
|
|
19862
|
-
this.proxyImage = document.createElement('img');
|
|
19863
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19864
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19865
|
-
|
|
19866
|
-
Object.assign(this.proxyImage.style, {
|
|
19867
|
-
position: 'absolute',
|
|
19868
|
-
margin: '0'
|
|
19869
|
-
});
|
|
19870
|
-
|
|
19871
|
-
return this.proxyImage;
|
|
19872
|
-
}
|
|
19873
|
-
}, {
|
|
19874
|
-
key: 'hideProxyImage',
|
|
19875
|
-
value: function hideProxyImage() {
|
|
19876
|
-
Object.assign(this.proxyImage.style, {
|
|
19877
|
-
display: 'none'
|
|
19878
|
-
});
|
|
19879
|
-
}
|
|
19880
|
-
}, {
|
|
19881
|
-
key: 'repositionProxyImage',
|
|
19882
|
-
value: function repositionProxyImage(unclickable) {
|
|
19883
|
-
var rect = unclickable.getBoundingClientRect();
|
|
19884
|
-
|
|
19885
|
-
Object.assign(this.proxyImage.style, {
|
|
19886
|
-
display: 'block',
|
|
19887
|
-
left: rect.left + window.pageXOffset + 'px',
|
|
19888
|
-
top: rect.top + window.pageYOffset + 'px',
|
|
19889
|
-
width: rect.width + 'px',
|
|
19890
|
-
height: rect.height + 'px'
|
|
19891
|
-
});
|
|
19892
|
-
}
|
|
19893
|
-
}]);
|
|
19894
|
-
|
|
19895
|
-
return UnclickableBlotSpec;
|
|
19896
|
-
}(_BlotSpec3.default);
|
|
19897
|
-
|
|
19898
|
-
UnclickableBlotSpec$1.default = UnclickableBlotSpec;
|
|
19899
|
-
|
|
19900
|
-
var hasRequiredIframeVideoSpec;
|
|
19901
|
-
|
|
19902
|
-
function requireIframeVideoSpec () {
|
|
19903
|
-
if (hasRequiredIframeVideoSpec) return IframeVideoSpec;
|
|
19904
|
-
hasRequiredIframeVideoSpec = 1;
|
|
19905
|
-
|
|
19906
|
-
Object.defineProperty(IframeVideoSpec, "__esModule", {
|
|
19907
|
-
value: true
|
|
19908
|
-
});
|
|
19909
|
-
|
|
19910
|
-
var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
|
|
19911
|
-
|
|
19912
|
-
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19913
|
-
|
|
19914
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19915
|
-
|
|
19916
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19917
|
-
|
|
19918
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19919
|
-
|
|
19920
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19921
|
-
|
|
19922
|
-
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; }
|
|
19923
|
-
|
|
19924
|
-
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; }
|
|
19925
|
-
|
|
19926
|
-
var IframeVideoSpec$1 = function (_UnclickableBlotSpec) {
|
|
19927
|
-
_inherits(IframeVideoSpec, _UnclickableBlotSpec);
|
|
19928
|
-
|
|
19929
|
-
function IframeVideoSpec(formatter) {
|
|
19930
|
-
_classCallCheck(this, IframeVideoSpec);
|
|
19931
|
-
|
|
19932
|
-
return _possibleConstructorReturn(this, (IframeVideoSpec.__proto__ || Object.getPrototypeOf(IframeVideoSpec)).call(this, formatter, 'iframe.ql-video'));
|
|
19933
|
-
}
|
|
19934
|
-
|
|
19935
|
-
return IframeVideoSpec;
|
|
19936
|
-
}(_UnclickableBlotSpec3.default);
|
|
19937
|
-
|
|
19938
|
-
IframeVideoSpec.default = IframeVideoSpec$1;
|
|
19939
|
-
return IframeVideoSpec;
|
|
19940
|
-
}
|
|
19941
|
-
|
|
19942
|
-
var hasRequiredOptions;
|
|
19943
|
-
|
|
19944
|
-
function requireOptions () {
|
|
19945
|
-
if (hasRequiredOptions) return Options;
|
|
19946
|
-
hasRequiredOptions = 1;
|
|
19947
|
-
|
|
19948
|
-
Object.defineProperty(Options, "__esModule", {
|
|
19949
|
-
value: true
|
|
19950
|
-
});
|
|
19951
|
-
|
|
19952
|
-
var _BlotSpec = requireBlotSpec();
|
|
19953
|
-
|
|
19954
|
-
_interopRequireDefault(_BlotSpec);
|
|
19955
|
-
|
|
19956
|
-
var _ImageSpec = requireImageSpec();
|
|
19957
|
-
|
|
19958
|
-
var _ImageSpec2 = _interopRequireDefault(_ImageSpec);
|
|
19959
|
-
|
|
19960
|
-
var _IframeVideoSpec = requireIframeVideoSpec();
|
|
19961
|
-
|
|
19962
|
-
var _IframeVideoSpec2 = _interopRequireDefault(_IframeVideoSpec);
|
|
19963
|
-
|
|
19964
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19965
|
-
|
|
19966
|
-
var DefaultOptions = {
|
|
19967
|
-
specs: [_ImageSpec2.default, _IframeVideoSpec2.default],
|
|
19968
|
-
overlay: {
|
|
19969
|
-
className: 'blot-formatter__overlay',
|
|
19970
|
-
style: {
|
|
19971
|
-
position: 'absolute',
|
|
19972
|
-
boxSizing: 'border-box',
|
|
19973
|
-
border: '1px dashed #444'
|
|
19974
|
-
}
|
|
19975
|
-
},
|
|
19976
|
-
align: {
|
|
19977
|
-
attribute: 'data-align',
|
|
19978
|
-
aligner: {
|
|
19979
|
-
applyStyle: true
|
|
19980
|
-
},
|
|
19981
|
-
icons: {
|
|
19982
|
-
left: '\n <svg viewbox="0 0 18 18">\n <line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"></line>\n <line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"></line>\n <line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"></line>\n </svg>\n ',
|
|
19983
|
-
center: '\n <svg viewbox="0 0 18 18">\n <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>\n <line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"></line>\n <line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"></line>\n </svg>\n ',
|
|
19984
|
-
right: '\n <svg viewbox="0 0 18 18">\n <line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"></line>\n <line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"></line>\n <line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"></line>\n </svg>\n '
|
|
19985
|
-
},
|
|
19986
|
-
toolbar: {
|
|
19987
|
-
allowDeselect: true,
|
|
19988
|
-
mainClassName: 'blot-formatter__toolbar',
|
|
19989
|
-
mainStyle: {
|
|
19990
|
-
position: 'absolute',
|
|
19991
|
-
top: '-12px',
|
|
19992
|
-
right: '0',
|
|
19993
|
-
left: '0',
|
|
19994
|
-
height: '0',
|
|
19995
|
-
minWidth: '100px',
|
|
19996
|
-
font: '12px/1.0 Arial, Helvetica, sans-serif',
|
|
19997
|
-
textAlign: 'center',
|
|
19998
|
-
color: '#333',
|
|
19999
|
-
boxSizing: 'border-box',
|
|
20000
|
-
cursor: 'default',
|
|
20001
|
-
zIndex: '1'
|
|
20002
|
-
},
|
|
20003
|
-
buttonClassName: 'blot-formatter__toolbar-button',
|
|
20004
|
-
addButtonSelectStyle: true,
|
|
20005
|
-
buttonStyle: {
|
|
20006
|
-
display: 'inline-block',
|
|
20007
|
-
width: '24px',
|
|
20008
|
-
height: '24px',
|
|
20009
|
-
background: 'white',
|
|
20010
|
-
border: '1px solid #999',
|
|
20011
|
-
verticalAlign: 'middle'
|
|
20012
|
-
},
|
|
20013
|
-
svgStyle: {
|
|
20014
|
-
display: 'inline-block',
|
|
20015
|
-
width: '24px',
|
|
20016
|
-
height: '24px',
|
|
20017
|
-
background: 'white',
|
|
20018
|
-
border: '1px solid #999',
|
|
20019
|
-
verticalAlign: 'middle'
|
|
20020
|
-
}
|
|
20021
|
-
}
|
|
20022
|
-
},
|
|
20023
|
-
resize: {
|
|
20024
|
-
handleClassName: 'blot-formatter__resize-handle',
|
|
20025
|
-
handleStyle: {
|
|
20026
|
-
position: 'absolute',
|
|
20027
|
-
height: '12px',
|
|
20028
|
-
width: '12px',
|
|
20029
|
-
backgroundColor: 'white',
|
|
20030
|
-
border: '1px solid #777',
|
|
20031
|
-
boxSizing: 'border-box',
|
|
20032
|
-
opacity: '0.80'
|
|
20033
|
-
}
|
|
20034
|
-
}
|
|
20035
|
-
};
|
|
20036
|
-
|
|
20037
|
-
Options.default = DefaultOptions;
|
|
20038
|
-
return Options;
|
|
20039
|
-
}
|
|
20040
|
-
|
|
20041
|
-
(function (exports) {
|
|
20042
|
-
|
|
20043
|
-
Object.defineProperty(exports, "__esModule", {
|
|
20044
|
-
value: true
|
|
20045
|
-
});
|
|
20046
|
-
|
|
20047
|
-
var _Options = requireOptions();
|
|
20048
|
-
|
|
20049
|
-
Object.defineProperty(exports, 'DefaultOptions', {
|
|
20050
|
-
enumerable: true,
|
|
20051
|
-
get: function get() {
|
|
20052
|
-
return _interopRequireDefault(_Options).default;
|
|
20053
|
-
}
|
|
20054
|
-
});
|
|
20055
|
-
|
|
20056
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
20057
|
-
|
|
20058
|
-
Object.defineProperty(exports, 'default', {
|
|
20059
|
-
enumerable: true,
|
|
20060
|
-
get: function get() {
|
|
20061
|
-
return _interopRequireDefault(_BlotFormatter).default;
|
|
20062
|
-
}
|
|
20063
|
-
});
|
|
20064
|
-
|
|
20065
|
-
var _Action = Action$1;
|
|
20066
|
-
|
|
20067
|
-
Object.defineProperty(exports, 'Action', {
|
|
20068
|
-
enumerable: true,
|
|
20069
|
-
get: function get() {
|
|
20070
|
-
return _interopRequireDefault(_Action).default;
|
|
20071
|
-
}
|
|
20072
|
-
});
|
|
20073
|
-
|
|
20074
|
-
var _AlignAction = requireAlignAction();
|
|
20075
|
-
|
|
20076
|
-
Object.defineProperty(exports, 'AlignAction', {
|
|
20077
|
-
enumerable: true,
|
|
20078
|
-
get: function get() {
|
|
20079
|
-
return _interopRequireDefault(_AlignAction).default;
|
|
20080
|
-
}
|
|
20081
|
-
});
|
|
20082
|
-
|
|
20083
|
-
var _DefaultAligner = DefaultAligner$1;
|
|
20084
|
-
|
|
20085
|
-
Object.defineProperty(exports, 'DefaultAligner', {
|
|
20086
|
-
enumerable: true,
|
|
20087
|
-
get: function get() {
|
|
20088
|
-
return _interopRequireDefault(_DefaultAligner).default;
|
|
20089
|
-
}
|
|
20090
|
-
});
|
|
20091
|
-
|
|
20092
|
-
var _DefaultToolbar = requireDefaultToolbar();
|
|
20093
|
-
|
|
20094
|
-
Object.defineProperty(exports, 'DefaultToolbar', {
|
|
20095
|
-
enumerable: true,
|
|
20096
|
-
get: function get() {
|
|
20097
|
-
return _interopRequireDefault(_DefaultToolbar).default;
|
|
20098
|
-
}
|
|
20099
|
-
});
|
|
20100
|
-
|
|
20101
|
-
var _DeleteAction = requireDeleteAction();
|
|
20102
|
-
|
|
20103
|
-
Object.defineProperty(exports, 'DeleteAction', {
|
|
20104
|
-
enumerable: true,
|
|
20105
|
-
get: function get() {
|
|
20106
|
-
return _interopRequireDefault(_DeleteAction).default;
|
|
20107
|
-
}
|
|
20108
|
-
});
|
|
20109
|
-
|
|
20110
|
-
var _ResizeAction = requireResizeAction();
|
|
20111
|
-
|
|
20112
|
-
Object.defineProperty(exports, 'ResizeAction', {
|
|
20113
|
-
enumerable: true,
|
|
20114
|
-
get: function get() {
|
|
20115
|
-
return _interopRequireDefault(_ResizeAction).default;
|
|
20116
|
-
}
|
|
20117
|
-
});
|
|
20118
|
-
|
|
20119
|
-
var _BlotSpec = requireBlotSpec();
|
|
20120
|
-
|
|
20121
|
-
Object.defineProperty(exports, 'BlotSpec', {
|
|
20122
|
-
enumerable: true,
|
|
20123
|
-
get: function get() {
|
|
20124
|
-
return _interopRequireDefault(_BlotSpec).default;
|
|
20125
|
-
}
|
|
20126
|
-
});
|
|
20127
|
-
|
|
20128
|
-
var _ImageSpec = requireImageSpec();
|
|
20129
|
-
|
|
20130
|
-
Object.defineProperty(exports, 'ImageSpec', {
|
|
20131
|
-
enumerable: true,
|
|
20132
|
-
get: function get() {
|
|
20133
|
-
return _interopRequireDefault(_ImageSpec).default;
|
|
20134
|
-
}
|
|
20135
|
-
});
|
|
20136
|
-
|
|
20137
|
-
var _UnclickableBlotSpec = UnclickableBlotSpec$1;
|
|
20138
|
-
|
|
20139
|
-
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
20140
|
-
enumerable: true,
|
|
20141
|
-
get: function get() {
|
|
20142
|
-
return _interopRequireDefault(_UnclickableBlotSpec).default;
|
|
20143
|
-
}
|
|
20144
|
-
});
|
|
20145
|
-
|
|
20146
|
-
var _IframeVideoSpec = requireIframeVideoSpec();
|
|
20147
|
-
|
|
20148
|
-
Object.defineProperty(exports, 'IframeVideoSpec', {
|
|
20149
|
-
enumerable: true,
|
|
20150
|
-
get: function get() {
|
|
20151
|
-
return _interopRequireDefault(_IframeVideoSpec).default;
|
|
20152
|
-
}
|
|
20153
|
-
});
|
|
20154
|
-
|
|
20155
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20156
|
-
} (dist));
|
|
20157
|
-
|
|
20158
|
-
var BlotFormatter = /*@__PURE__*/getDefaultExportFromCjs(dist);
|
|
20159
|
-
|
|
20160
|
-
function useBlotFormatter(editor, enableImageResize = true) {
|
|
20161
|
-
const quillRef = vue.ref(null);
|
|
20162
|
-
const removeQuillBlotFormatter = () => {
|
|
20163
|
-
var _a;
|
|
20164
|
-
try {
|
|
20165
|
-
const blotFormatter = (_a = quillRef.value) === null || _a === void 0 ? void 0 : _a.getModule('blotFormatter');
|
|
20166
|
-
if (blotFormatter && blotFormatter.overlay) {
|
|
20167
|
-
const overlay = blotFormatter.overlay;
|
|
20168
|
-
if (overlay.parentNode) {
|
|
20169
|
-
overlay.parentNode.removeChild(overlay);
|
|
20170
|
-
}
|
|
20171
|
-
}
|
|
20172
|
-
}
|
|
20173
|
-
catch (error) {
|
|
20174
|
-
console.warn('移除blotFormatter overlay时出错:', error);
|
|
20175
|
-
}
|
|
20176
|
-
};
|
|
20177
|
-
const handleBlotFormatterClick = (event) => {
|
|
20178
|
-
var _a;
|
|
20179
|
-
if (!editor.value)
|
|
20180
|
-
return;
|
|
20181
|
-
const blotFormatter = (_a = quillRef.value) === null || _a === void 0 ? void 0 : _a.getModule('blotFormatter');
|
|
20182
|
-
if (!blotFormatter || !blotFormatter.overlay)
|
|
20183
|
-
return;
|
|
20184
|
-
const isClickInsideEditor = editor.value.contains(event.target);
|
|
20185
|
-
if (!isClickInsideEditor) {
|
|
20186
|
-
removeQuillBlotFormatter();
|
|
20187
|
-
}
|
|
20188
|
-
};
|
|
20189
|
-
const configureBlotFormatter = () => {
|
|
20190
|
-
if (!quillRef.value)
|
|
20191
|
-
return;
|
|
20192
|
-
const blotFormatter = quillRef.value.getModule('blotFormatter');
|
|
20193
|
-
if (blotFormatter) {
|
|
20194
|
-
const originalShow = blotFormatter.show.bind(blotFormatter);
|
|
20195
|
-
blotFormatter.show = function (spec) {
|
|
20196
|
-
var _a;
|
|
20197
|
-
originalShow(spec);
|
|
20198
|
-
const target = (_a = this.currentSpec) === null || _a === void 0 ? void 0 : _a.getTargetElement();
|
|
20199
|
-
if (target && target.tagName === 'IMG') {
|
|
20200
|
-
target.style.maxWidth = '100%';
|
|
20201
|
-
target.style.height = 'auto';
|
|
20202
|
-
target.style.objectFit = 'contain';
|
|
20203
|
-
const width = target.getAttribute('width');
|
|
20204
|
-
if (width) {
|
|
20205
|
-
const naturalWidth = target.naturalWidth;
|
|
20206
|
-
const naturalHeight = target.naturalHeight;
|
|
20207
|
-
if (naturalWidth && naturalHeight) {
|
|
20208
|
-
const aspectRatio = naturalHeight / naturalWidth;
|
|
20209
|
-
const newHeight = Math.round(parseInt(width) * aspectRatio);
|
|
20210
|
-
target.setAttribute('height', '' + newHeight);
|
|
20211
|
-
}
|
|
20212
|
-
}
|
|
20213
|
-
}
|
|
20214
|
-
};
|
|
20215
|
-
}
|
|
20216
|
-
};
|
|
20217
|
-
const applyImageStyle = () => {
|
|
20218
|
-
var _a;
|
|
20219
|
-
if (!quillRef.value)
|
|
20220
|
-
return;
|
|
20221
|
-
const editorElement = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.querySelector('.ql-editor');
|
|
20222
|
-
if (editorElement) {
|
|
20223
|
-
const images = editorElement.querySelectorAll('img');
|
|
20224
|
-
images.forEach(img => {
|
|
20225
|
-
img.style.maxWidth = '100%';
|
|
20226
|
-
img.style.height = 'auto';
|
|
20227
|
-
img.style.objectFit = 'contain';
|
|
20228
|
-
});
|
|
20229
|
-
}
|
|
20230
|
-
};
|
|
20231
|
-
const registerBlotFormatter = () => {
|
|
20232
|
-
var _a;
|
|
20233
|
-
if (!enableImageResize) {
|
|
20234
|
-
return;
|
|
20235
|
-
}
|
|
20236
|
-
try {
|
|
20237
|
-
if (!((_a = Quill.imports) === null || _a === void 0 ? void 0 : _a['modules/blotFormatter'])) {
|
|
20238
|
-
Quill.register('modules/blotFormatter', BlotFormatter);
|
|
20239
|
-
}
|
|
20240
|
-
}
|
|
20241
|
-
catch (error) {
|
|
20242
|
-
console.warn('注册BlotFormatter模块时出错:', error);
|
|
20243
|
-
}
|
|
20244
|
-
};
|
|
20245
|
-
const getBlotFormatterConfig = () => {
|
|
20246
|
-
if (!enableImageResize) {
|
|
20247
|
-
return {};
|
|
20248
|
-
}
|
|
20249
|
-
return {
|
|
20250
|
-
modules: {
|
|
20251
|
-
blotFormatter: true
|
|
20252
|
-
}
|
|
20253
|
-
};
|
|
20254
|
-
};
|
|
20255
|
-
vue.onBeforeUnmount(() => {
|
|
20256
|
-
removeQuillBlotFormatter();
|
|
20257
|
-
});
|
|
20258
|
-
const setQuill = (quillInstance) => {
|
|
20259
|
-
quillRef.value = quillInstance;
|
|
20260
|
-
};
|
|
20261
|
-
return {
|
|
20262
|
-
quillRef,
|
|
20263
|
-
setQuill,
|
|
20264
|
-
handleBlotFormatterClick,
|
|
20265
|
-
configureBlotFormatter,
|
|
20266
|
-
applyImageStyle,
|
|
20267
|
-
registerBlotFormatter,
|
|
20268
|
-
getBlotFormatterConfig
|
|
20269
|
-
};
|
|
20270
|
-
}
|
|
20271
|
-
|
|
20272
|
-
function useLinkClick(editor, initialHandleCustomLink) {
|
|
20273
|
-
const quillRef = vue.ref(null);
|
|
20274
|
-
const handleCustomLinkRef = vue.ref(initialHandleCustomLink || null);
|
|
20275
|
-
const handleLinkClick = (event) => {
|
|
20276
|
-
if (!quillRef.value || !handleCustomLinkRef.value)
|
|
20277
|
-
return;
|
|
20278
|
-
const target = event.target;
|
|
20279
|
-
if (target.tagName === 'A') {
|
|
20280
|
-
event.preventDefault();
|
|
20281
|
-
event.stopPropagation();
|
|
20282
|
-
try {
|
|
20283
|
-
const linkElement = target;
|
|
20284
|
-
const linkUrl = linkElement.getAttribute('href') || '';
|
|
20285
|
-
const linkText = linkElement.textContent || '';
|
|
20286
|
-
const range = quillRef.value.getSelection();
|
|
20287
|
-
if (range) {
|
|
20288
|
-
const [blot] = quillRef.value.getLeaf(range.index);
|
|
20289
|
-
if (blot && blot.parent && blot.parent.domNode.tagName === 'A') {
|
|
20290
|
-
const linkBlot = blot.parent;
|
|
20291
|
-
const linkIndex = quillRef.value.getIndex(linkBlot);
|
|
20292
|
-
const linkLength = linkBlot.length();
|
|
20293
|
-
quillRef.value.setSelection(linkIndex, linkLength);
|
|
20294
|
-
handleCustomLinkRef.value(true, { url: linkUrl, text: linkText });
|
|
20295
|
-
}
|
|
20296
|
-
}
|
|
20297
|
-
}
|
|
20298
|
-
catch (error) {
|
|
20299
|
-
console.warn('选中链接失败:', error);
|
|
20300
|
-
}
|
|
20301
|
-
}
|
|
20302
|
-
};
|
|
20303
|
-
const addLinkClickListener = () => {
|
|
20304
|
-
if (!quillRef.value)
|
|
20305
|
-
return;
|
|
20306
|
-
vue.nextTick(() => {
|
|
20307
|
-
var _a;
|
|
20308
|
-
const editorElement = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.querySelector('.ql-editor');
|
|
20309
|
-
if (editorElement) {
|
|
20310
|
-
editorElement.removeEventListener('click', handleLinkClick);
|
|
20311
|
-
editorElement.addEventListener('click', handleLinkClick);
|
|
20312
|
-
}
|
|
20313
|
-
});
|
|
20314
|
-
};
|
|
20315
|
-
const setQuill = (quillInstance) => {
|
|
20316
|
-
quillRef.value = quillInstance;
|
|
20317
|
-
};
|
|
20318
|
-
const setHandleCustomLink = (fn) => {
|
|
20319
|
-
handleCustomLinkRef.value = fn;
|
|
20320
|
-
};
|
|
20321
|
-
return {
|
|
20322
|
-
quillRef,
|
|
20323
|
-
setQuill,
|
|
20324
|
-
setHandleCustomLink,
|
|
20325
|
-
handleLinkClick,
|
|
20326
|
-
addLinkClickListener
|
|
20327
|
-
};
|
|
20328
|
-
}
|
|
20329
|
-
|
|
20330
|
-
function useGlobalClick() {
|
|
20331
|
-
const clickHandlers = vue.ref([]);
|
|
20332
|
-
const handleGlobalClick = (event) => {
|
|
20333
|
-
clickHandlers.value.forEach(handler => {
|
|
20334
|
-
try {
|
|
20335
|
-
handler(event);
|
|
20336
|
-
}
|
|
20337
|
-
catch (error) {
|
|
20338
|
-
console.warn('全局点击事件处理函数执行出错:', error);
|
|
20339
|
-
}
|
|
20340
|
-
});
|
|
20341
|
-
};
|
|
20342
|
-
const addClickHandler = (handler) => {
|
|
20343
|
-
if (typeof handler === 'function' && !clickHandlers.value.includes(handler)) {
|
|
20344
|
-
clickHandlers.value.push(handler);
|
|
20345
|
-
}
|
|
20346
|
-
};
|
|
20347
|
-
const clearClickHandlers = () => {
|
|
20348
|
-
clickHandlers.value = [];
|
|
20349
|
-
};
|
|
20350
|
-
vue.onMounted(() => {
|
|
20351
|
-
window.addEventListener('click', handleGlobalClick, true);
|
|
20352
|
-
});
|
|
20353
|
-
vue.onBeforeUnmount(() => {
|
|
20354
|
-
window.removeEventListener('click', handleGlobalClick, true);
|
|
20355
|
-
clearClickHandlers();
|
|
20356
|
-
});
|
|
20357
|
-
return {
|
|
20358
|
-
clickHandlers: clickHandlers.value,
|
|
20359
|
-
addClickHandler,
|
|
20360
|
-
clearClickHandlers,
|
|
20361
|
-
handleGlobalClick
|
|
20362
|
-
};
|
|
20363
|
-
}
|
|
20364
|
-
|
|
20365
|
-
const boldSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M6.794999938146972,7.7800002288818355L9.045000038146974,7.7800002288818355Q9.855000038146972,7.7800002288818355,10.230000038146972,7.442500128881836Q10.605000038146972,7.105000028881836,10.605000038146972,6.505000128881836Q10.605000038146972,6.114999728881836,10.440000038146973,5.860000628881836Q10.275000138146972,5.6050005288818365,9.929999838146973,5.470000228881836Q9.585000038146973,5.335000028881836,9.045000038146974,5.335000028881836L7.139999938146973,5.335000028881836L7.139999938146973,3.385000228881836L9.045000038146974,3.385000228881836Q10.034999838146973,3.385000228881836,10.852499938146973,3.797500608881836Q11.670000038146974,4.2100000388818355,12.142499938146972,4.922500628881836Q12.614999738146974,5.635000228881836,12.614999738146974,6.505000128881836Q12.614999738146974,7.375000028881836,12.142499938146972,8.042500028881836Q11.670000038146974,8.710000028881836,10.860000138146972,9.070000128881837Q10.050000238146973,9.430000328881835,9.045000038146974,9.430000328881835L6.794999938146972,9.430000328881835L6.794999938146972,7.7800002288818355ZM7.139999938146973,12.550000228881835L9.329999938146972,12.550000228881835Q9.900000138146972,12.550000228881835,10.327499838146974,12.354999528881836Q10.755000138146972,12.159999828881835,10.987500238146973,11.807499928881835Q11.219999838146972,11.454999928881836,11.219999838146972,11.020000428881836Q11.219999838146972,10.600000428881836,10.987500238146973,10.232500028881836Q10.755000138146972,9.864999728881836,10.327499838146974,9.647500028881836Q9.900000138146972,9.430000328881835,9.329999938146972,9.430000328881835L6.975000038146972,9.430000328881835L6.975000038146972,7.7800002288818355L9.329999938146972,7.7800002288818355Q10.349999938146972,7.7800002288818355,11.250000038146972,8.200000328881835Q12.149999638146973,8.620000328881837,12.690000538146972,9.362500228881835Q13.229999538146973,10.104999528881836,13.229999538146973,11.034999828881837Q13.229999538146973,11.949999828881836,12.690000538146972,12.752500528881836Q12.149999638146973,13.555000228881836,11.250000038146972,14.027500228881836Q10.349999938146972,14.500000228881836,9.329999938146972,14.500000228881836L7.139999938146973,14.500000228881836L7.139999938146973,12.550000228881835ZM7.064999938146973,14.500000228881836Q6.284999968146972,14.500000228881836,5.872500058146973,14.095000228881837Q5.460000038146973,13.689999228881836,5.460000038146973,12.895000428881836L5.460000038146973,4.989999728881836Q5.460000038146973,4.195000648881836,5.872500058146973,3.789999958881836Q6.284999968146972,3.385000228881836,7.064999938146973,3.385000228881836L7.469999838146973,3.385000228881836L7.469999838146973,14.500000228881836L7.064999938146973,14.500000228881836Z" fill="#555555" fill-opacity="1"/></g></g></svg>`;
|
|
20366
|
-
const italicSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M8,3Q7.9015086,3,7.8049095,3.019214718Q7.7083106,3.038429435,7.6173165,3.076120459Q7.5263224,3.11381148,7.4444296,3.16853037Q7.3625371,3.2232492600000002,7.2928932,3.2928932Q7.2232492,3.36253715,7.1685302,3.4444297600000002Q7.1138113999999995,3.52632231,7.0761204,3.61731648Q7.0384293,3.70831072,7.0192146,3.80490965Q6.99999994,3.90150857,7,4Q6.99999994,4.0984913,7.0192146,4.1950902Q7.0384293,4.291689,7.0761204,4.3826833Q7.1138113999999995,4.4736774,7.1685302,4.5555699Q7.2232492,4.6374626,7.2928932,4.7071065999999995Q7.3625371,4.7767504,7.4444296,4.8314693Q7.5263224,4.8861883,7.6173165,4.9238794Q7.7083106,4.9615704,7.8049096,4.9807851Q7.9015086,4.9999999,8,5L9.137146,5L8,13L7,13Q6.90150857,13,6.80490965,13.019215Q6.70831072,13.038429,6.6173164799999995,13.07612Q6.52632231,13.113811,6.44442973,13.16853Q6.36253715,13.223249,6.2928932,13.292892Q6.22324926,13.362536,6.16853037,13.444429Q6.11381148,13.526321,6.076120459,13.617315Q6.038429435,13.708309,6.019214718,13.804909Q6,13.901508,6,14Q6,14.098491,6.019214718,14.195089Q6.038429435,14.291689,6.076120459,14.382683Q6.11381148,14.473677,6.16853037,14.555569Q6.22324926,14.637462,6.2928932,14.707106Q6.36253715,14.77675,6.44442976,14.831469Q6.52632231,14.886187,6.6173164799999995,14.923878Q6.70831072,14.961569,6.80490965,14.980784Q6.90150857,15,7,15L11,15Q11.0984912,15,11.1950898,14.980784Q11.2916889,14.961569,11.382682800000001,14.923878Q11.473677200000001,14.886187,11.5555696,14.831469Q11.6374626,14.77675,11.7071066,14.707106Q11.7767506,14.637462,11.8314691,14.555569Q11.8861876,14.473677,11.9238791,14.382683Q11.9615698,14.291689,11.9807849,14.195089Q12,14.098491,12,14Q12,13.901508,11.9807849,13.804909Q11.9615698,13.708309,11.9238791,13.617315Q11.8861876,13.526321,11.8314691,13.444428Q11.7767506,13.362536,11.7071066,13.292892Q11.6374626,13.223249,11.5555701,13.16853Q11.473677200000001,13.113811,11.382682800000001,13.07612Q11.2916889,13.038429,11.1950903,13.019215Q11.0984912,13,11,13L9.8626451,13L11,5L12,5Q12.0984907,4.9999999,12.1950893,4.9807851Q12.2916884,4.9615703,12.382682800000001,4.9238793Q12.4736767,4.8861883,12.5555696,4.8314693Q12.6374621,4.7767504,12.7071061,4.7071065999999995Q12.776750100000001,4.6374626,12.831468600000001,4.5555699Q12.8861876,4.4736774,12.9238787,4.3826833Q12.9615698,4.291689,12.9807849,4.1950902Q12.999999500000001,4.0984913,13,4Q12.999999500000001,3.90150857,12.980784400000001,3.80490965Q12.9615698,3.70831072,12.9238787,3.61731648Q12.8861876,3.52632231,12.8314691,3.44442973Q12.7767506,3.36253715,12.7071066,3.2928932Q12.6374626,3.2232492600000002,12.5555696,3.16853037Q12.4736767,3.11381148,12.382682800000001,3.076120459Q12.2916884,3.038429435,12.1950898,3.019214718Q12.0984907,3,12,3L8,3Z" fill-rule="evenodd" fill="#555555" fill-opacity="1"/></g></g></svg>`;
|
|
20367
|
-
const underlineSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M5.000117301940918,14.500022450683593L5.000117301940918,14.500022450683593Q5.000117301940918,14.450777450683594,5.009724660740918,14.402477450683593Q5.019332019940918,14.354177450683594,5.038177530940918,14.308679450683593Q5.057023040940918,14.263182450683594,5.084382488940918,14.222236450683594Q5.111741931940918,14.181290450683594,5.146563901940918,14.146469450683593Q5.181385871940918,14.111646450683594,5.222332181940918,14.084286450683594Q5.263278451940918,14.056927450683594,5.308775541940918,14.038082450683595Q5.354272661940918,14.019237450683594,5.402572121940918,14.009630450683593Q5.450871581940918,14.000022450683593,5.500117301940918,14.000022450683593L12.500117301940918,14.000022450683593Q12.549362201940918,14.000022450683593,12.597661501940918,14.009629450683594Q12.645960801940918,14.019237450683594,12.691457701940918,14.038082450683595Q12.736954701940917,14.056926450683594,12.777901601940918,14.084285450683593Q12.818847701940918,14.111645450683593,12.853670101940917,14.146468450683594Q12.888492101940919,14.181289450683593,12.915851601940918,14.222235450683593Q12.943210601940919,14.263181450683593,12.962056201940918,14.308679450683593Q12.980901701940919,14.354177450683594,12.990509501940917,14.402477450683593Q13.00011680194092,14.450777450683594,13.000117301940918,14.500022450683593L13.000117301940918,14.500022450683593Q13.00011680194092,14.549268450683593,12.990509001940918,14.597566450683594Q12.980901701940919,14.645866450683593,12.962056201940918,14.691363450683594Q12.943210601940919,14.736860450683594,12.915851601940918,14.777807450683595Q12.888492101940919,14.818753450683595,12.853670101940917,14.853575450683593Q12.818847701940918,14.888397450683593,12.777901601940918,14.915756450683594Q12.736954701940917,14.943115450683594,12.691457701940918,14.961960450683593Q12.645960801940918,14.980806450683593,12.597661501940918,14.990413450683594Q12.549362201940918,15.000021450683594,12.500117301940918,15.000022450683593L5.500117301940918,15.000022450683593Q5.450871581940918,15.000021450683594,5.402572121940918,14.990414450683593Q5.354272661940918,14.980806450683593,5.308775541940918,14.961960450683593Q5.263278451940918,14.943115450683594,5.222332161940918,14.915756450683594Q5.181385871940918,14.888397450683593,5.146563901940918,14.853574450683594Q5.111741931940918,14.818752450683593,5.084382488940918,14.777806450683594Q5.057023040940918,14.736860450683594,5.038177530940918,14.691363450683594Q5.019332019940918,14.645866450683593,5.009724660740918,14.597567450683593Q5.000117301940918,14.549268450683593,5.000117301940918,14.500022450683593ZM5.045039176940918,3.548906330683594Q5.045039176940918,3.1015625006835936,5.283039211940918,2.8637809706835937Q5.521039131940918,2.6259994506835938,5.969039081940918,2.6259994506835938L5.997039201940918,2.6259994506835938Q6.445039201940918,2.6259994506835938,6.6830393019409176,2.8637809706835937Q6.921039201940918,3.1015625006835936,6.921039201940918,3.548906330683594L6.921039201940918,9.010000250683593Q6.921039201940918,9.737999950683594,7.180039401940919,10.255999550683594Q7.439039201940918,10.774000150683595,7.908039101940918,11.053999950683593Q8.377039001940918,11.333999650683594,8.993039101940917,11.333999650683594Q9.609039301940918,11.333999650683594,10.085039101940918,11.060999850683594Q10.561039401940917,10.788000150683594,10.820039301940918,10.263000450683593Q11.079039101940918,9.737999950683594,11.079039101940918,9.010000250683593L11.079039101940918,3.548906330683594Q11.079039101940918,3.1015625006835936,11.317039501940918,2.8637809706835937Q11.555039401940917,2.6259994506835938,12.003039401940917,2.6259994506835938L12.031039201940917,2.6259994506835938Q12.479039201940918,2.6259994506835938,12.717039101940918,2.8637809706835937Q12.955039001940918,3.1015625006835936,12.955039001940918,3.548906330683594L12.955039001940918,9.010000250683593Q12.955039001940918,10.144000050683594,12.416039501940919,11.095999750683594Q11.877039901940918,12.048000350683594,10.967039101940918,12.600999850683595Q10.057039301940918,13.154000450683593,8.993039101940917,13.154000450683593Q7.929039001940918,13.154000450683593,7.0190392019409185,12.600999850683595Q6.109039201940918,12.048000350683594,5.577039361940918,11.095999750683594Q5.045039176940918,10.144000050683594,5.045039176940918,9.010000250683593L5.045039176940918,3.548906330683594Z" fill="#555555" fill-opacity="1"/></g></g></svg>`;
|
|
20368
|
-
const moreSVG = `<svg t="1756109058354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11458" width="18" height="18"><path d="M512 320q-3.150769 0-6.301538-0.315077-3.111385-0.315077-6.183385-0.905846-3.072-0.630154-6.104615-1.536-2.993231-0.905846-5.907693-2.126769-2.914462-1.181538-5.671384-2.678154-2.756923-1.496615-5.395693-3.229539-2.599385-1.732923-5.04123-3.741538-2.441846-1.969231-4.647385-4.214154-2.244923-2.205538-4.214154-4.647385-1.969231-2.441846-3.741538-5.04123-1.732923-2.638769-3.229539-5.395693-1.496615-2.756923-2.678154-5.671384-1.181538-2.914462-2.126769-5.907693-0.905846-3.032615-1.536-6.104615-0.590769-3.072-0.905846-6.222769T448 256q0-3.150769 0.315077-6.301538 0.315077-3.111385 0.905846-6.183385 0.630154-3.072 1.536-6.104615 0.905846-2.993231 2.126769-5.907693 1.181538-2.914462 2.678154-5.671384 1.496615-2.756923 3.229539-5.395693 1.732923-2.599385 3.741538-5.04123 1.969231-2.441846 4.214154-4.647385 2.205538-2.205538 4.647385-4.214154 2.441846-1.969231 5.04123-3.741538 2.638769-1.732923 5.395693-3.229539 2.756923-1.496615 5.671384-2.678154 2.914462-1.181538 5.907693-2.126769 3.032615-0.905846 6.104615-1.536 3.072-0.590769 6.222769-0.905846T512 192q3.150769 0 6.301538 0.315077 3.111385 0.315077 6.183385 0.905846 3.072 0.630154 6.104615 1.536 2.993231 0.905846 5.907693 2.126769 2.914462 1.181538 5.671384 2.678154 2.756923 1.496615 5.395693 3.229539 2.599385 1.732923 5.04123 3.741538 2.441846 1.969231 4.647385 4.214154 2.205538 2.205538 4.214154 4.647385 1.969231 2.441846 3.741538 5.04123 1.732923 2.638769 3.229539 5.395693 1.496615 2.756923 2.678154 5.671384 1.181538 2.914462 2.126769 5.907693 0.905846 3.032615 1.536 6.104615 0.590769 3.072 0.905846 6.222769t0.315077 6.262154q0 3.150769-0.315077 6.301538-0.315077 3.111385-0.905846 6.183385-0.630154 3.072-1.536 6.104615-0.905846 2.993231-2.126769 5.907693-1.181538 2.914462-2.678154 5.671384-1.496615 2.756923-3.229539 5.395693-1.732923 2.599385-3.741538 5.04123-1.969231 2.441846-4.214154 4.647385-2.205538 2.244923-4.647385 4.214154-2.441846 1.969231-5.04123 3.741538-2.638769 1.732923-5.395693 3.229539-2.756923 1.496615-5.671384 2.678154-2.914462 1.181538-5.907693 2.126769-3.032615 0.905846-6.104615 1.536-3.072 0.590769-6.222769 0.905846T512 320z m0 256q-3.150769 0-6.301538-0.315077-3.111385-0.315077-6.183385-0.905846-3.072-0.630154-6.104615-1.536-2.993231-0.905846-5.907693-2.126769-2.914462-1.181538-5.671384-2.678154-2.756923-1.496615-5.395693-3.229539-2.599385-1.732923-5.04123-3.741538-2.441846-1.969231-4.647385-4.214154-2.244923-2.205538-4.214154-4.647385-1.969231-2.441846-3.741538-5.04123-1.732923-2.638769-3.229539-5.395693-1.496615-2.756923-2.678154-5.671384-1.181538-2.914462-2.126769-5.907693-0.905846-3.032615-1.536-6.104615-0.590769-3.072-0.905846-6.222769T448 512q0-3.150769 0.315077-6.301538 0.315077-3.111385 0.905846-6.183385 0.630154-3.072 1.536-6.104615 0.905846-2.993231 2.126769-5.907693 1.181538-2.914462 2.678154-5.671384 1.496615-2.756923 3.229539-5.395693 1.732923-2.599385 3.741538-5.04123 1.969231-2.441846 4.214154-4.647385 2.205538-2.244923 4.647385-4.214154 2.441846-1.969231 5.04123-3.741538 2.638769-1.732923 5.395693-3.229539 2.756923-1.496615 5.671384-2.678154 2.914462-1.181538 5.907693-2.126769 3.032615-0.905846 6.104615-1.536 3.072-0.590769 6.222769-0.905846T512 448q3.150769 0 6.301538 0.315077 3.111385 0.315077 6.183385 0.905846 3.072 0.630154 6.104615 1.536 2.993231 0.905846 5.907693 2.126769 2.914462 1.181538 5.671384 2.678154 2.756923 1.496615 5.395693 3.229539 2.599385 1.732923 5.04123 3.741538 2.441846 1.969231 4.647385 4.214154 2.205538 2.205538 4.214154 4.647385 1.969231 2.441846 3.741538 5.04123 1.732923 2.638769 3.229539 5.395693 1.496615 2.756923 2.678154 5.671384 1.181538 2.914462 2.126769 5.907693 0.905846 3.032615 1.536 6.104615 0.590769 3.072 0.905846 6.222769t0.315077 6.262154q0 3.150769-0.315077 6.301538-0.315077 3.111385-0.905846 6.183385-0.630154 3.072-1.536 6.104615-0.905846 2.993231-2.126769 5.907693-1.181538 2.914462-2.678154 5.671384-1.496615 2.756923-3.229539 5.395693-1.732923 2.599385-3.741538 5.04123-1.969231 2.441846-4.214154 4.647385-2.205538 2.244923-4.647385 4.214154-2.441846 1.969231-5.04123 3.741538-2.638769 1.732923-5.395693 3.229539-2.756923 1.496615-5.671384 2.678154-2.914462 1.181538-5.907693 2.126769-3.032615 0.905846-6.104615 1.536-3.072 0.590769-6.222769 0.905846T512 576z m0 256q-3.150769 0-6.301538-0.315077-3.111385-0.315077-6.183385-0.905846-3.072-0.630154-6.104615-1.536-2.993231-0.905846-5.907693-2.126769-2.914462-1.181538-5.671384-2.678154-2.756923-1.496615-5.395693-3.229539-2.599385-1.732923-5.04123-3.741538-2.441846-1.969231-4.647385-4.214154-2.244923-2.205538-4.214154-4.647385-1.969231-2.441846-3.741538-5.04123-1.732923-2.638769-3.229539-5.395693-1.496615-2.756923-2.678154-5.671384-1.181538-2.914462-2.126769-5.907693-0.905846-3.032615-1.536-6.104615-0.590769-3.072-0.905846-6.222769t-0.315077-6.262154q0-3.150769 0.315077-6.301538 0.315077-3.111385 0.905846-6.183385 0.630154-3.072 1.536-6.104615 0.905846-2.993231 2.126769-5.907693 1.181538-2.914462 2.678154-5.671384 1.496615-2.756923 3.229539-5.395693 1.732923-2.599385 3.741538-5.04123 1.969231-2.441846 4.214154-4.647385 2.205538-2.205538 4.647385-4.214154 2.441846-1.969231 5.04123-3.741538 2.638769-1.732923 5.395693-3.229539 2.756923-1.496615 5.671384-2.678154 2.914462-1.181538 5.907693-2.126769 3.032615-0.905846 6.104615-1.536 3.072-0.590769 6.222769-0.905846T512 704q3.150769 0 6.301538 0.315077 3.111385 0.315077 6.183385 0.905846 3.072 0.630154 6.104615 1.536 2.993231 0.905846 5.907693 2.126769 2.914462 1.181538 5.671384 2.678154 2.756923 1.496615 5.395693 3.229539 2.599385 1.732923 5.04123 3.741538 2.441846 1.969231 4.647385 4.214154 2.205538 2.205538 4.214154 4.647385 1.969231 2.441846 3.741538 5.04123 1.732923 2.638769 3.229539 5.395693 1.496615 2.756923 2.678154 5.671384 1.181538 2.914462 2.126769 5.907693 0.905846 3.032615 1.536 6.104615 0.590769 3.072 0.905846 6.222769t0.315077 6.262154q0 3.150769-0.315077 6.301538-0.315077 3.111385-0.905846 6.183385-0.630154 3.072-1.536 6.104615-0.905846 2.993231-2.126769 5.907693-1.181538 2.914462-2.678154 5.671384-1.496615 2.756923-3.229539 5.395693-1.732923 2.599385-3.741538 5.04123-1.969231 2.441846-4.214154 4.647385-2.205538 2.205538-4.647385 4.214154-2.441846 1.969231-5.04123 3.741538-2.638769 1.732923-5.395693 3.229539-2.756923 1.496615-5.671384 2.678154-2.914462 1.181538-5.907693 2.126769-3.032615 0.905846-6.104615 1.536-3.072 0.590769-6.222769 0.905846T512 832z" p-id="11459" fill="#555555"></path></svg>`;
|
|
20369
|
-
const linkSVG = `<svg t="1756107950494" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11245" width="18" height="18" style="padding:1px"><path d="M292.693333 564.906667L123.477333 395.648q-55.296-55.338667-54.272-134.4 1.066667-78.336 57.088-134.357333Q182.186667 70.912 260.608 69.845333q79.061333-1.066667 134.4 54.272l194.944 194.986667a40.533333 40.533333 0 0 1 0.938667 0.938667q54.4 55.04 53.333333 133.461333-1.066667 78.336-57.045333 134.357333a42.666667 42.666667 0 1 1-60.330667-60.330666q31.445333-31.488 32.042667-75.178667 0.597333-43.050667-29.269334-72.874667a44.458667 44.458667 0 0 1-0.853333-0.896l-194.133333-194.133333q-72.618667-72.618667-148.053334 2.773333-31.488 31.488-32.085333 75.178667-0.554667 43.050667 29.269333 72.874667l169.258667 169.301333a42.666667 42.666667 0 1 1-60.288 60.330667z m202.538667-69.674667a42.666667 42.666667 0 0 0-60.330667-60.373333q-55.978667 56.021333-57.045333 134.4-1.066667 79.018667 54.272 134.357333a40.362667 40.362667 0 0 0 0.981333 0.938667l1.706667 1.877333 194.986667 194.986667q55.338667 55.296 134.4 54.229333 78.336-1.066667 134.357333-57.045333 55.978667-56.021333 57.045333-134.4 1.066667-79.018667-54.272-134.357334l-169.258666-169.258666a42.666667 42.666667 0 1 0-60.373334 60.330666l169.301334 169.301334q29.866667 29.866667 29.269333 72.874666-0.597333 43.690667-32.042667 75.178667-31.488 31.445333-75.178666 32.042667-43.050667 0.597333-72.874667-29.269334l-194.986667-194.986666a39.68 39.68 0 0 0-0.981333-0.938667 43.52 43.52 0 0 0-1.749333-1.834667q-29.866667-29.866667-29.269334-72.917333 0.554667-43.690667 32.042667-75.136z" p-id="11246" fill="#555555"></path></svg>`;
|
|
20370
|
-
const undoSVG = `<svg t="1756107888940" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10819" width="18" height="18"><path d="M220.086857 374.893714l102.473143 102.473143c10.605714 10.642286 28.818286 3.108571 28.818286-11.922286v-77.275428h261.851428l8.009143 0.146286c98.048 3.364571 169.216 68.754286 169.216 160.182857 0 93.952-75.044571 160.365714-177.225143 160.365714H241.883429l-3.437715 0.256a25.307429 25.307429 0 0 0 3.437715 50.395429h371.346285l8.374857-0.146286c124.708571-3.657143 219.501714-90.148571 219.501715-210.834286 0-123.392-99.035429-211.017143-227.876572-211.017143h-261.851428V260.498286a16.896 16.896 0 0 0-28.818286-11.922286L220.086857 351.049143a16.896 16.896 0 0 0 0 23.844571z" p-id="10820" fill="#555555"></path></svg>`;
|
|
20371
|
-
const redoSVG = `<svg t="1756107908999" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11032" width="18" height="18"><path d="M836.205714 374.893714l-102.473143 102.473143a16.896 16.896 0 0 1-28.818285-11.922286v-77.275428h-261.851429l-8.045714 0.146286c-98.011429 3.364571-169.179429 68.754286-169.179429 160.182857 0 93.952 75.044571 160.365714 177.225143 160.365714h371.346286l3.437714 0.256a25.307429 25.307429 0 0 1-3.437714 50.395429H443.062857l-8.374857-0.146286c-124.708571-3.657143-219.501714-90.148571-219.501714-210.834286 0-123.392 99.035429-211.017143 227.84-211.017143h261.888V260.498286c0-15.030857 18.176-22.564571 28.818285-11.922286l102.473143 102.473143c6.582857 6.582857 6.582857 17.261714 0 23.844571z" p-id="11033" fill="#555555"></path></svg>`;
|
|
20372
|
-
const ocrSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="15" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M3.0000245140625,2.6000244140625L5.5000243140625,2.6000244140625C5.8313951140625,2.6000244140625,6.1000242140625,2.3313953240625,6.1000242140625,2.0000244340625C6.1000242140625,1.6686535440624999,5.8313951140625,1.4000244140625,5.5000243140625,1.4000244140625L3.0000245140625,1.4000244140625Q2.3372827740625,1.4000244140625,1.8686535940625,1.8686535940625Q1.4000244140625,2.3372827740625,1.4000244140625,3.0000245140625L1.4000244140625,5.5000243140625C1.4000244140625,5.8313951140625,1.6686535440624999,6.1000242140625,2.0000244340625,6.1000242140625C2.3313953240625,6.1000242140625,2.6000244140625,5.8313951140625,2.6000244140625,5.5000243140625L2.6000244140625,3.0000245140625Q2.6000244140625,2.6000244140625,3.0000245140625,2.6000244140625ZM12.5000244140625,1.4000244140625L15.0000244140625,1.4000244140625Q15.6627664140625,1.4000244140625,16.1313954140625,1.8686538940625Q16.6000244140625,2.3372834940625,16.6000244140625,3.0000245140625L16.6000244140625,5.5000243140625C16.6000244140625,5.6591539140625,16.5368104140625,5.8117661140625,16.424288414062502,5.9242883140625C16.3117674140625,6.0368099140625,16.1591544140625,6.1000242140625,16.0000244140625,6.1000242140625C15.6686534140625,6.1000242140625,15.4000244140625,5.8313951140625,15.4000244140625,5.5000243140625L15.4000234140625,3.0000245140625Q15.4000234140625,2.6000244140625,15.0000244140625,2.6000244140625L12.5000244140625,2.6000244140625C12.1686534140625,2.6000244140625,11.9000244140625,2.3313953240625,11.9000244140625,2.0000244340625C11.9000244140625,1.6686535440624999,12.1686534140625,1.4000244140625,12.5000244140625,1.4000244140625ZM8.6239776140625,6.4719930140625C8.5439777140625,6.1512432140625,8.3999777140625,5.7421179140625,8.2479777140625,5.4212432140625L9.4959774140625,5.052368214062501C9.6959782140625,5.4293680140625,9.9199772140625,5.9346180140625,9.9999771140625,6.2714929140625L9.3519778140625,6.4719930140625L12.7119784140625,6.4719930140625L12.7119784140625,7.6079931140625L11.5039774140625,7.6079931140625C11.1279774140625,8.6968679140625,10.6159782140625,9.6014929140625,9.9599781140625,10.3461180140625C10.7599773140625,10.9224930140625,11.7279774140625,11.3468685140625,12.8879774140625,11.6029934140625C12.6239774140625,11.8592434140625,12.2799774140625,12.3716184140625,12.1039784140625,12.6918684140625C10.8719778140625,12.3716184140625,9.8719778140625,11.8752434140625,9.0479779140625,11.2107429140625C8.175977714062501,11.8992434140625,7.1199779140625,12.4036184140625,5.8559775140625,12.7558684140625C5.7279777140625,12.4757434140625,5.3759775140625,11.9312434140625,5.1519775140625,11.6591184140625C6.3759775140625,11.3868685140625,7.3839779140625,10.9706182140625,8.1839781140625,10.3781185140625C7.5199776140625,9.6094932140625,7.0079775140625,8.6888685140625,6.5919776140625,7.6079931140625L5.3279776140625,7.6079931140625L5.3279776140625,6.4719930140625L8.6239776140625,6.4719930140625ZM7.7999778140625,7.6079931140625C8.1119776140625,8.344617814062499,8.5359778140625,9.0011186140625,9.0719776140625,9.5694933140625C9.5439777140625,9.0251179140625,9.9199772140625,8.3766184140625,10.1919784140625,7.6079931140625L7.7999778140625,7.6079931140625ZM2.6000244140625,12.5000244140625L2.6000244140625,15.0000244140625Q2.6000244140625,15.4000234140625,3.0000245140625,15.4000234140625L5.5000243140625,15.4000234140625C5.8313951140625,15.4000244140625,6.1000242140625,15.6686534140625,6.1000242140625,16.0000244140625C6.1000242140625,16.3313964140625,5.8313951140625,16.6000254140625,5.5000243140625,16.6000254140625L5.4989548140625,16.6000244140625L3.0000245140625,16.6000244140625Q2.3372834940625,16.6000244140625,1.8686538940625,16.1313954140625Q1.4000244140625,15.6627664140625,1.4000244140625,15.0000244140625L1.4000244140625,12.5000244140625C1.4000244140625,12.1686534140625,1.6686535440624999,11.9000244140625,2.0000244340625,11.9000244140625C2.3313953240625,11.9000244140625,2.6000244140625,12.1686534140625,2.6000244140625,12.5000244140625ZM16.6000244140625,12.5010944140625L16.6000244140625,15.0000244140625Q16.6000244140625,15.6627654140625,16.1313954140625,16.1313954140625Q15.6627654140625,16.6000244140625,15.0000244140625,16.6000244140625L12.5000244140625,16.6000244140625C12.3408944140625,16.6000244140625,12.1882824140625,16.5368104140625,12.0757594140625,16.424288414062502C11.9632384140625,16.3117664140625,11.9000244140625,16.1591544140625,11.9000244140625,16.0000244140625C11.9000244140625,15.6686534140625,12.1686534140625,15.4000244140625,12.5000244140625,15.4000244140625L15.0000244140625,15.4000234140625Q15.4000234140625,15.4000234140625,15.4000234140625,15.0000244140625L15.4000234140625,12.5000244140625C15.4000244140625,12.1686534140625,15.6686534140625,11.9000244140625,16.0000244140625,11.9000244140625C16.3313964140625,11.9000244140625,16.6000254140625,12.1686534140625,16.6000254140625,12.5000244140625L16.6000244140625,12.5010944140625Z" fill-rule="evenodd" fill="#555555" fill-opacity="1"/></g></g></svg>`;
|
|
20373
|
-
const mathSVG = `<svg t="1756107836493" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10608" width="16" height="15"><path d="M877.454222 856.177778q4.835556-4.835556 7.395556-11.093334 2.616889-6.257778 2.616889-13.084444 0-3.413333-0.625778-6.656-0.682667-3.299556-1.991111-6.428444-1.251556-3.072-3.128889-5.859556-1.877333-2.844444-4.266667-5.176889-2.332444-2.389333-5.12-4.266667-2.844444-1.877333-5.916444-3.128888-3.128889-1.308444-6.428445-1.934223-3.299556-0.682667-6.656-0.682666-6.826667 0-13.084444 2.616889-6.257778 2.56-11.036445 7.395555l-54.044444 53.987556H253.155556l325.688888-325.745778q2.389333-2.389333 4.266667-5.12 1.877333-2.844444 3.128889-5.916445 1.308444-3.128889 1.934222-6.428444 0.682667-3.299556 0.682667-6.656 0-3.413333-0.682667-6.656-0.625778-3.299556-1.934222-6.428444-1.251556-3.072-3.128889-5.859556-1.877333-2.844444-4.266667-5.176889L253.155556 162.133333h522.126222l53.930666 53.987556q4.835556 4.835556 11.093334 7.395555 6.257778 2.616889 13.084444 2.616889 3.413333 0 6.656-0.682666 3.299556-0.625778 6.428445-1.934223 3.072-1.251556 5.859555-3.128888 2.844444-1.877333 5.176889-4.266667 2.389333-2.389333 4.266667-5.12 1.877333-2.844444 3.128889-5.916445 1.308444-3.128889 1.934222-6.428444 0.682667-3.299556 0.682667-6.656 0-6.826667-2.616889-13.084444-2.56-6.257778-7.395556-11.036445l-64-64q-4.778667-4.835556-11.036444-7.395555-6.257778-2.616889-13.084445-2.616889H170.666667q-6.826667 0-13.084445 2.616889-6.257778 2.56-11.036444 7.395555-2.389333 2.389333-4.266667 5.12-1.877333 2.844444-3.128889 5.916445-1.308444 3.128889-1.934222 6.428444-0.682667 3.299556-0.682667 6.656 0 3.413333 0.682667 6.656 0.625778 3.299556 1.934222 6.428444 1.251556 3.072 3.128889 5.859556 1.877333 2.844444 4.266667 5.176889L506.311111 512l-359.822222 359.879111q-4.835556 4.778667-7.395556 11.036445-2.616889 6.257778-2.616889 13.084444 0 3.413333 0.682667 6.656 0.625778 3.299556 1.934222 6.428444 1.251556 3.072 3.128889 5.859556 1.877333 2.844444 4.266667 5.176889 2.389333 2.389333 5.12 4.266667 2.844444 1.877333 5.916444 3.128888 3.128889 1.308444 6.428445 1.991112 3.299556 0.625778 6.656 0.625777h618.666666q6.826667 0 13.084445-2.616889 6.257778-2.56 11.036444-7.395555l64-63.943111z" p-id="10609" fill="#555555"></path></svg>`;
|
|
20374
|
-
const imageSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M1.87471507,3.83578219Q1.5,4.18540478,1.5,4.6875L1.5,14.312503Q1.50000006,14.814598,1.874716,15.16422Q2.23459671,15.5,2.73684216,15.5L15.263157,15.5Q15.765403,15.5,16.125284,15.164218Q16.499999000000003,14.814597,16.499999000000003,14.312501L16.499999000000003,4.6875Q16.499999000000003,4.18540342,16.125284999999998,3.83578214Q15.765404,3.5,15.263157,3.5L2.73684216,3.5Q2.23459646,3.5,1.87471507,3.83578219ZM2.5,14.312503L2.5,4.6875Q2.5,4.5,2.73684216,4.5L15.263157,4.5Q15.5,4.5,15.5,4.6875L15.5,14.312501Q15.5,14.5,15.263157,14.5L2.73684216,14.5Q2.5,14.5,2.5,14.312503Z" fill-rule="evenodd" fill="#555555" fill-opacity="1" style="mix-blend-mode:passthrough"/></g><g><ellipse cx="5.4375" cy="7.4375" rx="0.4375" ry="0.4375" fill-opacity="0" stroke-opacity="1" stroke="#555555" fill="none" stroke-width="1" stroke-linecap="ROUND" stroke-linejoin="round" style="mix-blend-mode:passthrough"/></g><g><path d="M5.9053998,9.924615948146972L1.7143693,12.841608238146973Q1.61364189,12.911715538146973,1.55682093,13.020492338146973Q1.5,13.129269138146974,1.5,13.251992238146972L1.50000003,14.418008338146972Q1.50000003,14.876594038146973,1.84130602,15.195924738146973Q2.16843581,15.501991738146973,2.62437022,15.501991738146973L15.375628,15.501991738146973Q15.831564,15.501991738146973,16.158693,15.195924738146973Q16.5,14.876594038146973,16.5,14.418007838146973L16.5,13.251992238146972Q16.500000999999997,13.186988838146974,16.48338,13.124146438146973Q16.466759,13.061303638146972,16.434621,13.004799838146972Q16.402485,12.948296338146973,16.356969,12.901887938146972Q16.311453,12.855479738146972,16.255583,12.822251838146972L9.8796926,9.030259398146972Q9.842938400000001,9.008400078146973,9.8030057,8.993099628146974Q9.763073,8.977799118146972,9.721121799999999,8.969501908146972Q9.6791716,8.961204618146972,9.6364217,8.960151608146973Q9.5936708,8.959098578146973,9.551362000000001,8.965320438146973Q9.5090542,8.971542238146972,9.4684162,8.984858218146973Q9.427778199999999,8.998174158146973,9.3899918,9.018197478146973Q9.352206200000001,9.038220708146973,9.3183689,9.064369648146972Q9.284532500000001,9.090518598146973,9.2556267,9.122033748146972L7.6887164,10.830422738146973L6.4904227,9.934544588146972Q6.4273362,9.887379288146972,6.3528042,9.861893948146973Q6.2782726,9.836408678146972,6.1995153,9.835072038146972Q6.1207581,9.833735408146973,6.045404,9.856676968146973Q5.9700503000000005,9.879618528146972,5.9053998,9.924615948146972ZM2.5,13.513173138146973L2.50000006,14.418008338146972Q2.50000006,14.501992238146972,2.62437022,14.501992238146972L15.375628,14.501992238146972Q15.5,14.501992238146972,15.5,14.418007838146973L15.5,13.536368338146973L9.7178593,10.097503488146973L8.1200023,11.839632738146973Q8.0888524,11.873595438146973,8.052019600000001,11.901292338146973Q8.0151863,11.928988938146972,7.9739118,11.949486538146973Q7.9326363,11.969984038146972,7.88831,11.982591638146973Q7.8439837,11.995199238146974,7.7980995,11.999492138146973Q7.7522154,12.003785338146972,7.7063198,11.999619238146973Q7.6604242,11.995453338146973,7.6160631,11.982968338146973Q7.571702,11.970483338146973,7.5303702,11.950099938146973Q7.4890385,11.929716538146973,7.4521289,11.902122038146972L6.1805682,10.951467238146973L2.5,13.513173138146973Z" fill-rule="evenodd" fill="#555555" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>`;
|
|
18861
|
+
const boldSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M6.794999938146972,7.7800002288818355L9.045000038146974,7.7800002288818355Q9.855000038146972,7.7800002288818355,10.230000038146972,7.442500128881836Q10.605000038146972,7.105000028881836,10.605000038146972,6.505000128881836Q10.605000038146972,6.114999728881836,10.440000038146973,5.860000628881836Q10.275000138146972,5.6050005288818365,9.929999838146973,5.470000228881836Q9.585000038146973,5.335000028881836,9.045000038146974,5.335000028881836L7.139999938146973,5.335000028881836L7.139999938146973,3.385000228881836L9.045000038146974,3.385000228881836Q10.034999838146973,3.385000228881836,10.852499938146973,3.797500608881836Q11.670000038146974,4.2100000388818355,12.142499938146972,4.922500628881836Q12.614999738146974,5.635000228881836,12.614999738146974,6.505000128881836Q12.614999738146974,7.375000028881836,12.142499938146972,8.042500028881836Q11.670000038146974,8.710000028881836,10.860000138146972,9.070000128881837Q10.050000238146973,9.430000328881835,9.045000038146974,9.430000328881835L6.794999938146972,9.430000328881835L6.794999938146972,7.7800002288818355ZM7.139999938146973,12.550000228881835L9.329999938146972,12.550000228881835Q9.900000138146972,12.550000228881835,10.327499838146974,12.354999528881836Q10.755000138146972,12.159999828881835,10.987500238146973,11.807499928881835Q11.219999838146972,11.454999928881836,11.219999838146972,11.020000428881836Q11.219999838146972,10.600000428881836,10.987500238146973,10.232500028881836Q10.755000138146972,9.864999728881836,10.327499838146974,9.647500028881836Q9.900000138146972,9.430000328881835,9.329999938146972,9.430000328881835L6.975000038146972,9.430000328881835L6.975000038146972,7.7800002288818355L9.329999938146972,7.7800002288818355Q10.349999938146972,7.7800002288818355,11.250000038146972,8.200000328881835Q12.149999638146973,8.620000328881837,12.690000538146972,9.362500228881835Q13.229999538146973,10.104999528881836,13.229999538146973,11.034999828881837Q13.229999538146973,11.949999828881836,12.690000538146972,12.752500528881836Q12.149999638146973,13.555000228881836,11.250000038146972,14.027500228881836Q10.349999938146972,14.500000228881836,9.329999938146972,14.500000228881836L7.139999938146973,14.500000228881836L7.139999938146973,12.550000228881835ZM7.064999938146973,14.500000228881836Q6.284999968146972,14.500000228881836,5.872500058146973,14.095000228881837Q5.460000038146973,13.689999228881836,5.460000038146973,12.895000428881836L5.460000038146973,4.989999728881836Q5.460000038146973,4.195000648881836,5.872500058146973,3.789999958881836Q6.284999968146972,3.385000228881836,7.064999938146973,3.385000228881836L7.469999838146973,3.385000228881836L7.469999838146973,14.500000228881836L7.064999938146973,14.500000228881836Z" fill="#555555" fill-opacity="1"/></g></g></svg>`;
|
|
18862
|
+
const italicSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M8,3Q7.9015086,3,7.8049095,3.019214718Q7.7083106,3.038429435,7.6173165,3.076120459Q7.5263224,3.11381148,7.4444296,3.16853037Q7.3625371,3.2232492600000002,7.2928932,3.2928932Q7.2232492,3.36253715,7.1685302,3.4444297600000002Q7.1138113999999995,3.52632231,7.0761204,3.61731648Q7.0384293,3.70831072,7.0192146,3.80490965Q6.99999994,3.90150857,7,4Q6.99999994,4.0984913,7.0192146,4.1950902Q7.0384293,4.291689,7.0761204,4.3826833Q7.1138113999999995,4.4736774,7.1685302,4.5555699Q7.2232492,4.6374626,7.2928932,4.7071065999999995Q7.3625371,4.7767504,7.4444296,4.8314693Q7.5263224,4.8861883,7.6173165,4.9238794Q7.7083106,4.9615704,7.8049096,4.9807851Q7.9015086,4.9999999,8,5L9.137146,5L8,13L7,13Q6.90150857,13,6.80490965,13.019215Q6.70831072,13.038429,6.6173164799999995,13.07612Q6.52632231,13.113811,6.44442973,13.16853Q6.36253715,13.223249,6.2928932,13.292892Q6.22324926,13.362536,6.16853037,13.444429Q6.11381148,13.526321,6.076120459,13.617315Q6.038429435,13.708309,6.019214718,13.804909Q6,13.901508,6,14Q6,14.098491,6.019214718,14.195089Q6.038429435,14.291689,6.076120459,14.382683Q6.11381148,14.473677,6.16853037,14.555569Q6.22324926,14.637462,6.2928932,14.707106Q6.36253715,14.77675,6.44442976,14.831469Q6.52632231,14.886187,6.6173164799999995,14.923878Q6.70831072,14.961569,6.80490965,14.980784Q6.90150857,15,7,15L11,15Q11.0984912,15,11.1950898,14.980784Q11.2916889,14.961569,11.382682800000001,14.923878Q11.473677200000001,14.886187,11.5555696,14.831469Q11.6374626,14.77675,11.7071066,14.707106Q11.7767506,14.637462,11.8314691,14.555569Q11.8861876,14.473677,11.9238791,14.382683Q11.9615698,14.291689,11.9807849,14.195089Q12,14.098491,12,14Q12,13.901508,11.9807849,13.804909Q11.9615698,13.708309,11.9238791,13.617315Q11.8861876,13.526321,11.8314691,13.444428Q11.7767506,13.362536,11.7071066,13.292892Q11.6374626,13.223249,11.5555701,13.16853Q11.473677200000001,13.113811,11.382682800000001,13.07612Q11.2916889,13.038429,11.1950903,13.019215Q11.0984912,13,11,13L9.8626451,13L11,5L12,5Q12.0984907,4.9999999,12.1950893,4.9807851Q12.2916884,4.9615703,12.382682800000001,4.9238793Q12.4736767,4.8861883,12.5555696,4.8314693Q12.6374621,4.7767504,12.7071061,4.7071065999999995Q12.776750100000001,4.6374626,12.831468600000001,4.5555699Q12.8861876,4.4736774,12.9238787,4.3826833Q12.9615698,4.291689,12.9807849,4.1950902Q12.999999500000001,4.0984913,13,4Q12.999999500000001,3.90150857,12.980784400000001,3.80490965Q12.9615698,3.70831072,12.9238787,3.61731648Q12.8861876,3.52632231,12.8314691,3.44442973Q12.7767506,3.36253715,12.7071066,3.2928932Q12.6374626,3.2232492600000002,12.5555696,3.16853037Q12.4736767,3.11381148,12.382682800000001,3.076120459Q12.2916884,3.038429435,12.1950898,3.019214718Q12.0984907,3,12,3L8,3Z" fill-rule="evenodd" fill="#555555" fill-opacity="1"/></g></g></svg>`;
|
|
18863
|
+
const underlineSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M5.000117301940918,14.500022450683593L5.000117301940918,14.500022450683593Q5.000117301940918,14.450777450683594,5.009724660740918,14.402477450683593Q5.019332019940918,14.354177450683594,5.038177530940918,14.308679450683593Q5.057023040940918,14.263182450683594,5.084382488940918,14.222236450683594Q5.111741931940918,14.181290450683594,5.146563901940918,14.146469450683593Q5.181385871940918,14.111646450683594,5.222332181940918,14.084286450683594Q5.263278451940918,14.056927450683594,5.308775541940918,14.038082450683595Q5.354272661940918,14.019237450683594,5.402572121940918,14.009630450683593Q5.450871581940918,14.000022450683593,5.500117301940918,14.000022450683593L12.500117301940918,14.000022450683593Q12.549362201940918,14.000022450683593,12.597661501940918,14.009629450683594Q12.645960801940918,14.019237450683594,12.691457701940918,14.038082450683595Q12.736954701940917,14.056926450683594,12.777901601940918,14.084285450683593Q12.818847701940918,14.111645450683593,12.853670101940917,14.146468450683594Q12.888492101940919,14.181289450683593,12.915851601940918,14.222235450683593Q12.943210601940919,14.263181450683593,12.962056201940918,14.308679450683593Q12.980901701940919,14.354177450683594,12.990509501940917,14.402477450683593Q13.00011680194092,14.450777450683594,13.000117301940918,14.500022450683593L13.000117301940918,14.500022450683593Q13.00011680194092,14.549268450683593,12.990509001940918,14.597566450683594Q12.980901701940919,14.645866450683593,12.962056201940918,14.691363450683594Q12.943210601940919,14.736860450683594,12.915851601940918,14.777807450683595Q12.888492101940919,14.818753450683595,12.853670101940917,14.853575450683593Q12.818847701940918,14.888397450683593,12.777901601940918,14.915756450683594Q12.736954701940917,14.943115450683594,12.691457701940918,14.961960450683593Q12.645960801940918,14.980806450683593,12.597661501940918,14.990413450683594Q12.549362201940918,15.000021450683594,12.500117301940918,15.000022450683593L5.500117301940918,15.000022450683593Q5.450871581940918,15.000021450683594,5.402572121940918,14.990414450683593Q5.354272661940918,14.980806450683593,5.308775541940918,14.961960450683593Q5.263278451940918,14.943115450683594,5.222332161940918,14.915756450683594Q5.181385871940918,14.888397450683593,5.146563901940918,14.853574450683594Q5.111741931940918,14.818752450683593,5.084382488940918,14.777806450683594Q5.057023040940918,14.736860450683594,5.038177530940918,14.691363450683594Q5.019332019940918,14.645866450683593,5.009724660740918,14.597567450683593Q5.000117301940918,14.549268450683593,5.000117301940918,14.500022450683593ZM5.045039176940918,3.548906330683594Q5.045039176940918,3.1015625006835936,5.283039211940918,2.8637809706835937Q5.521039131940918,2.6259994506835938,5.969039081940918,2.6259994506835938L5.997039201940918,2.6259994506835938Q6.445039201940918,2.6259994506835938,6.6830393019409176,2.8637809706835937Q6.921039201940918,3.1015625006835936,6.921039201940918,3.548906330683594L6.921039201940918,9.010000250683593Q6.921039201940918,9.737999950683594,7.180039401940919,10.255999550683594Q7.439039201940918,10.774000150683595,7.908039101940918,11.053999950683593Q8.377039001940918,11.333999650683594,8.993039101940917,11.333999650683594Q9.609039301940918,11.333999650683594,10.085039101940918,11.060999850683594Q10.561039401940917,10.788000150683594,10.820039301940918,10.263000450683593Q11.079039101940918,9.737999950683594,11.079039101940918,9.010000250683593L11.079039101940918,3.548906330683594Q11.079039101940918,3.1015625006835936,11.317039501940918,2.8637809706835937Q11.555039401940917,2.6259994506835938,12.003039401940917,2.6259994506835938L12.031039201940917,2.6259994506835938Q12.479039201940918,2.6259994506835938,12.717039101940918,2.8637809706835937Q12.955039001940918,3.1015625006835936,12.955039001940918,3.548906330683594L12.955039001940918,9.010000250683593Q12.955039001940918,10.144000050683594,12.416039501940919,11.095999750683594Q11.877039901940918,12.048000350683594,10.967039101940918,12.600999850683595Q10.057039301940918,13.154000450683593,8.993039101940917,13.154000450683593Q7.929039001940918,13.154000450683593,7.0190392019409185,12.600999850683595Q6.109039201940918,12.048000350683594,5.577039361940918,11.095999750683594Q5.045039176940918,10.144000050683594,5.045039176940918,9.010000250683593L5.045039176940918,3.548906330683594Z" fill="#555555" fill-opacity="1"/></g></g></svg>`;
|
|
18864
|
+
const moreSVG = `<svg t="1756109058354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11458" width="18" height="18"><path d="M512 320q-3.150769 0-6.301538-0.315077-3.111385-0.315077-6.183385-0.905846-3.072-0.630154-6.104615-1.536-2.993231-0.905846-5.907693-2.126769-2.914462-1.181538-5.671384-2.678154-2.756923-1.496615-5.395693-3.229539-2.599385-1.732923-5.04123-3.741538-2.441846-1.969231-4.647385-4.214154-2.244923-2.205538-4.214154-4.647385-1.969231-2.441846-3.741538-5.04123-1.732923-2.638769-3.229539-5.395693-1.496615-2.756923-2.678154-5.671384-1.181538-2.914462-2.126769-5.907693-0.905846-3.032615-1.536-6.104615-0.590769-3.072-0.905846-6.222769T448 256q0-3.150769 0.315077-6.301538 0.315077-3.111385 0.905846-6.183385 0.630154-3.072 1.536-6.104615 0.905846-2.993231 2.126769-5.907693 1.181538-2.914462 2.678154-5.671384 1.496615-2.756923 3.229539-5.395693 1.732923-2.599385 3.741538-5.04123 1.969231-2.441846 4.214154-4.647385 2.205538-2.205538 4.647385-4.214154 2.441846-1.969231 5.04123-3.741538 2.638769-1.732923 5.395693-3.229539 2.756923-1.496615 5.671384-2.678154 2.914462-1.181538 5.907693-2.126769 3.032615-0.905846 6.104615-1.536 3.072-0.590769 6.222769-0.905846T512 192q3.150769 0 6.301538 0.315077 3.111385 0.315077 6.183385 0.905846 3.072 0.630154 6.104615 1.536 2.993231 0.905846 5.907693 2.126769 2.914462 1.181538 5.671384 2.678154 2.756923 1.496615 5.395693 3.229539 2.599385 1.732923 5.04123 3.741538 2.441846 1.969231 4.647385 4.214154 2.205538 2.205538 4.214154 4.647385 1.969231 2.441846 3.741538 5.04123 1.732923 2.638769 3.229539 5.395693 1.496615 2.756923 2.678154 5.671384 1.181538 2.914462 2.126769 5.907693 0.905846 3.032615 1.536 6.104615 0.590769 3.072 0.905846 6.222769t0.315077 6.262154q0 3.150769-0.315077 6.301538-0.315077 3.111385-0.905846 6.183385-0.630154 3.072-1.536 6.104615-0.905846 2.993231-2.126769 5.907693-1.181538 2.914462-2.678154 5.671384-1.496615 2.756923-3.229539 5.395693-1.732923 2.599385-3.741538 5.04123-1.969231 2.441846-4.214154 4.647385-2.205538 2.244923-4.647385 4.214154-2.441846 1.969231-5.04123 3.741538-2.638769 1.732923-5.395693 3.229539-2.756923 1.496615-5.671384 2.678154-2.914462 1.181538-5.907693 2.126769-3.032615 0.905846-6.104615 1.536-3.072 0.590769-6.222769 0.905846T512 320z m0 256q-3.150769 0-6.301538-0.315077-3.111385-0.315077-6.183385-0.905846-3.072-0.630154-6.104615-1.536-2.993231-0.905846-5.907693-2.126769-2.914462-1.181538-5.671384-2.678154-2.756923-1.496615-5.395693-3.229539-2.599385-1.732923-5.04123-3.741538-2.441846-1.969231-4.647385-4.214154-2.244923-2.205538-4.214154-4.647385-1.969231-2.441846-3.741538-5.04123-1.732923-2.638769-3.229539-5.395693-1.496615-2.756923-2.678154-5.671384-1.181538-2.914462-2.126769-5.907693-0.905846-3.032615-1.536-6.104615-0.590769-3.072-0.905846-6.222769T448 512q0-3.150769 0.315077-6.301538 0.315077-3.111385 0.905846-6.183385 0.630154-3.072 1.536-6.104615 0.905846-2.993231 2.126769-5.907693 1.181538-2.914462 2.678154-5.671384 1.496615-2.756923 3.229539-5.395693 1.732923-2.599385 3.741538-5.04123 1.969231-2.441846 4.214154-4.647385 2.205538-2.244923 4.647385-4.214154 2.441846-1.969231 5.04123-3.741538 2.638769-1.732923 5.395693-3.229539 2.756923-1.496615 5.671384-2.678154 2.914462-1.181538 5.907693-2.126769 3.032615-0.905846 6.104615-1.536 3.072-0.590769 6.222769-0.905846T512 448q3.150769 0 6.301538 0.315077 3.111385 0.315077 6.183385 0.905846 3.072 0.630154 6.104615 1.536 2.993231 0.905846 5.907693 2.126769 2.914462 1.181538 5.671384 2.678154 2.756923 1.496615 5.395693 3.229539 2.599385 1.732923 5.04123 3.741538 2.441846 1.969231 4.647385 4.214154 2.205538 2.205538 4.214154 4.647385 1.969231 2.441846 3.741538 5.04123 1.732923 2.638769 3.229539 5.395693 1.496615 2.756923 2.678154 5.671384 1.181538 2.914462 2.126769 5.907693 0.905846 3.032615 1.536 6.104615 0.590769 3.072 0.905846 6.222769t0.315077 6.262154q0 3.150769-0.315077 6.301538-0.315077 3.111385-0.905846 6.183385-0.630154 3.072-1.536 6.104615-0.905846 2.993231-2.126769 5.907693-1.181538 2.914462-2.678154 5.671384-1.496615 2.756923-3.229539 5.395693-1.732923 2.599385-3.741538 5.04123-1.969231 2.441846-4.214154 4.647385-2.205538 2.244923-4.647385 4.214154-2.441846 1.969231-5.04123 3.741538-2.638769 1.732923-5.395693 3.229539-2.756923 1.496615-5.671384 2.678154-2.914462 1.181538-5.907693 2.126769-3.032615 0.905846-6.104615 1.536-3.072 0.590769-6.222769 0.905846T512 576z m0 256q-3.150769 0-6.301538-0.315077-3.111385-0.315077-6.183385-0.905846-3.072-0.630154-6.104615-1.536-2.993231-0.905846-5.907693-2.126769-2.914462-1.181538-5.671384-2.678154-2.756923-1.496615-5.395693-3.229539-2.599385-1.732923-5.04123-3.741538-2.441846-1.969231-4.647385-4.214154-2.244923-2.205538-4.214154-4.647385-1.969231-2.441846-3.741538-5.04123-1.732923-2.638769-3.229539-5.395693-1.496615-2.756923-2.678154-5.671384-1.181538-2.914462-2.126769-5.907693-0.905846-3.032615-1.536-6.104615-0.590769-3.072-0.905846-6.222769t-0.315077-6.262154q0-3.150769 0.315077-6.301538 0.315077-3.111385 0.905846-6.183385 0.630154-3.072 1.536-6.104615 0.905846-2.993231 2.126769-5.907693 1.181538-2.914462 2.678154-5.671384 1.496615-2.756923 3.229539-5.395693 1.732923-2.599385 3.741538-5.04123 1.969231-2.441846 4.214154-4.647385 2.205538-2.205538 4.647385-4.214154 2.441846-1.969231 5.04123-3.741538 2.638769-1.732923 5.395693-3.229539 2.756923-1.496615 5.671384-2.678154 2.914462-1.181538 5.907693-2.126769 3.032615-0.905846 6.104615-1.536 3.072-0.590769 6.222769-0.905846T512 704q3.150769 0 6.301538 0.315077 3.111385 0.315077 6.183385 0.905846 3.072 0.630154 6.104615 1.536 2.993231 0.905846 5.907693 2.126769 2.914462 1.181538 5.671384 2.678154 2.756923 1.496615 5.395693 3.229539 2.599385 1.732923 5.04123 3.741538 2.441846 1.969231 4.647385 4.214154 2.205538 2.205538 4.214154 4.647385 1.969231 2.441846 3.741538 5.04123 1.732923 2.638769 3.229539 5.395693 1.496615 2.756923 2.678154 5.671384 1.181538 2.914462 2.126769 5.907693 0.905846 3.032615 1.536 6.104615 0.590769 3.072 0.905846 6.222769t0.315077 6.262154q0 3.150769-0.315077 6.301538-0.315077 3.111385-0.905846 6.183385-0.630154 3.072-1.536 6.104615-0.905846 2.993231-2.126769 5.907693-1.181538 2.914462-2.678154 5.671384-1.496615 2.756923-3.229539 5.395693-1.732923 2.599385-3.741538 5.04123-1.969231 2.441846-4.214154 4.647385-2.205538 2.205538-4.647385 4.214154-2.441846 1.969231-5.04123 3.741538-2.638769 1.732923-5.395693 3.229539-2.756923 1.496615-5.671384 2.678154-2.914462 1.181538-5.907693 2.126769-3.032615 0.905846-6.104615 1.536-3.072 0.590769-6.222769 0.905846T512 832z" p-id="11459" fill="#555555"></path></svg>`;
|
|
18865
|
+
const linkSVG = `<svg t="1756107950494" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11245" width="18" height="18" style="padding:1px"><path d="M292.693333 564.906667L123.477333 395.648q-55.296-55.338667-54.272-134.4 1.066667-78.336 57.088-134.357333Q182.186667 70.912 260.608 69.845333q79.061333-1.066667 134.4 54.272l194.944 194.986667a40.533333 40.533333 0 0 1 0.938667 0.938667q54.4 55.04 53.333333 133.461333-1.066667 78.336-57.045333 134.357333a42.666667 42.666667 0 1 1-60.330667-60.330666q31.445333-31.488 32.042667-75.178667 0.597333-43.050667-29.269334-72.874667a44.458667 44.458667 0 0 1-0.853333-0.896l-194.133333-194.133333q-72.618667-72.618667-148.053334 2.773333-31.488 31.488-32.085333 75.178667-0.554667 43.050667 29.269333 72.874667l169.258667 169.301333a42.666667 42.666667 0 1 1-60.288 60.330667z m202.538667-69.674667a42.666667 42.666667 0 0 0-60.330667-60.373333q-55.978667 56.021333-57.045333 134.4-1.066667 79.018667 54.272 134.357333a40.362667 40.362667 0 0 0 0.981333 0.938667l1.706667 1.877333 194.986667 194.986667q55.338667 55.296 134.4 54.229333 78.336-1.066667 134.357333-57.045333 55.978667-56.021333 57.045333-134.4 1.066667-79.018667-54.272-134.357334l-169.258666-169.258666a42.666667 42.666667 0 1 0-60.373334 60.330666l169.301334 169.301334q29.866667 29.866667 29.269333 72.874666-0.597333 43.690667-32.042667 75.178667-31.488 31.445333-75.178666 32.042667-43.050667 0.597333-72.874667-29.269334l-194.986667-194.986666a39.68 39.68 0 0 0-0.981333-0.938667 43.52 43.52 0 0 0-1.749333-1.834667q-29.866667-29.866667-29.269334-72.917333 0.554667-43.690667 32.042667-75.136z" p-id="11246" fill="#555555"></path></svg>`;
|
|
18866
|
+
const undoSVG = `<svg t="1756107888940" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10819" width="18" height="18"><path d="M220.086857 374.893714l102.473143 102.473143c10.605714 10.642286 28.818286 3.108571 28.818286-11.922286v-77.275428h261.851428l8.009143 0.146286c98.048 3.364571 169.216 68.754286 169.216 160.182857 0 93.952-75.044571 160.365714-177.225143 160.365714H241.883429l-3.437715 0.256a25.307429 25.307429 0 0 0 3.437715 50.395429h371.346285l8.374857-0.146286c124.708571-3.657143 219.501714-90.148571 219.501715-210.834286 0-123.392-99.035429-211.017143-227.876572-211.017143h-261.851428V260.498286a16.896 16.896 0 0 0-28.818286-11.922286L220.086857 351.049143a16.896 16.896 0 0 0 0 23.844571z" p-id="10820" fill="#555555"></path></svg>`;
|
|
18867
|
+
const redoSVG = `<svg t="1756107908999" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11032" width="18" height="18"><path d="M836.205714 374.893714l-102.473143 102.473143a16.896 16.896 0 0 1-28.818285-11.922286v-77.275428h-261.851429l-8.045714 0.146286c-98.011429 3.364571-169.179429 68.754286-169.179429 160.182857 0 93.952 75.044571 160.365714 177.225143 160.365714h371.346286l3.437714 0.256a25.307429 25.307429 0 0 1-3.437714 50.395429H443.062857l-8.374857-0.146286c-124.708571-3.657143-219.501714-90.148571-219.501714-210.834286 0-123.392 99.035429-211.017143 227.84-211.017143h261.888V260.498286c0-15.030857 18.176-22.564571 28.818285-11.922286l102.473143 102.473143c6.582857 6.582857 6.582857 17.261714 0 23.844571z" p-id="11033" fill="#555555"></path></svg>`;
|
|
18868
|
+
const ocrSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="15" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M3.0000245140625,2.6000244140625L5.5000243140625,2.6000244140625C5.8313951140625,2.6000244140625,6.1000242140625,2.3313953240625,6.1000242140625,2.0000244340625C6.1000242140625,1.6686535440624999,5.8313951140625,1.4000244140625,5.5000243140625,1.4000244140625L3.0000245140625,1.4000244140625Q2.3372827740625,1.4000244140625,1.8686535940625,1.8686535940625Q1.4000244140625,2.3372827740625,1.4000244140625,3.0000245140625L1.4000244140625,5.5000243140625C1.4000244140625,5.8313951140625,1.6686535440624999,6.1000242140625,2.0000244340625,6.1000242140625C2.3313953240625,6.1000242140625,2.6000244140625,5.8313951140625,2.6000244140625,5.5000243140625L2.6000244140625,3.0000245140625Q2.6000244140625,2.6000244140625,3.0000245140625,2.6000244140625ZM12.5000244140625,1.4000244140625L15.0000244140625,1.4000244140625Q15.6627664140625,1.4000244140625,16.1313954140625,1.8686538940625Q16.6000244140625,2.3372834940625,16.6000244140625,3.0000245140625L16.6000244140625,5.5000243140625C16.6000244140625,5.6591539140625,16.5368104140625,5.8117661140625,16.424288414062502,5.9242883140625C16.3117674140625,6.0368099140625,16.1591544140625,6.1000242140625,16.0000244140625,6.1000242140625C15.6686534140625,6.1000242140625,15.4000244140625,5.8313951140625,15.4000244140625,5.5000243140625L15.4000234140625,3.0000245140625Q15.4000234140625,2.6000244140625,15.0000244140625,2.6000244140625L12.5000244140625,2.6000244140625C12.1686534140625,2.6000244140625,11.9000244140625,2.3313953240625,11.9000244140625,2.0000244340625C11.9000244140625,1.6686535440624999,12.1686534140625,1.4000244140625,12.5000244140625,1.4000244140625ZM8.6239776140625,6.4719930140625C8.5439777140625,6.1512432140625,8.3999777140625,5.7421179140625,8.2479777140625,5.4212432140625L9.4959774140625,5.052368214062501C9.6959782140625,5.4293680140625,9.9199772140625,5.9346180140625,9.9999771140625,6.2714929140625L9.3519778140625,6.4719930140625L12.7119784140625,6.4719930140625L12.7119784140625,7.6079931140625L11.5039774140625,7.6079931140625C11.1279774140625,8.6968679140625,10.6159782140625,9.6014929140625,9.9599781140625,10.3461180140625C10.7599773140625,10.9224930140625,11.7279774140625,11.3468685140625,12.8879774140625,11.6029934140625C12.6239774140625,11.8592434140625,12.2799774140625,12.3716184140625,12.1039784140625,12.6918684140625C10.8719778140625,12.3716184140625,9.8719778140625,11.8752434140625,9.0479779140625,11.2107429140625C8.175977714062501,11.8992434140625,7.1199779140625,12.4036184140625,5.8559775140625,12.7558684140625C5.7279777140625,12.4757434140625,5.3759775140625,11.9312434140625,5.1519775140625,11.6591184140625C6.3759775140625,11.3868685140625,7.3839779140625,10.9706182140625,8.1839781140625,10.3781185140625C7.5199776140625,9.6094932140625,7.0079775140625,8.6888685140625,6.5919776140625,7.6079931140625L5.3279776140625,7.6079931140625L5.3279776140625,6.4719930140625L8.6239776140625,6.4719930140625ZM7.7999778140625,7.6079931140625C8.1119776140625,8.344617814062499,8.5359778140625,9.0011186140625,9.0719776140625,9.5694933140625C9.5439777140625,9.0251179140625,9.9199772140625,8.3766184140625,10.1919784140625,7.6079931140625L7.7999778140625,7.6079931140625ZM2.6000244140625,12.5000244140625L2.6000244140625,15.0000244140625Q2.6000244140625,15.4000234140625,3.0000245140625,15.4000234140625L5.5000243140625,15.4000234140625C5.8313951140625,15.4000244140625,6.1000242140625,15.6686534140625,6.1000242140625,16.0000244140625C6.1000242140625,16.3313964140625,5.8313951140625,16.6000254140625,5.5000243140625,16.6000254140625L5.4989548140625,16.6000244140625L3.0000245140625,16.6000244140625Q2.3372834940625,16.6000244140625,1.8686538940625,16.1313954140625Q1.4000244140625,15.6627664140625,1.4000244140625,15.0000244140625L1.4000244140625,12.5000244140625C1.4000244140625,12.1686534140625,1.6686535440624999,11.9000244140625,2.0000244340625,11.9000244140625C2.3313953240625,11.9000244140625,2.6000244140625,12.1686534140625,2.6000244140625,12.5000244140625ZM16.6000244140625,12.5010944140625L16.6000244140625,15.0000244140625Q16.6000244140625,15.6627654140625,16.1313954140625,16.1313954140625Q15.6627654140625,16.6000244140625,15.0000244140625,16.6000244140625L12.5000244140625,16.6000244140625C12.3408944140625,16.6000244140625,12.1882824140625,16.5368104140625,12.0757594140625,16.424288414062502C11.9632384140625,16.3117664140625,11.9000244140625,16.1591544140625,11.9000244140625,16.0000244140625C11.9000244140625,15.6686534140625,12.1686534140625,15.4000244140625,12.5000244140625,15.4000244140625L15.0000244140625,15.4000234140625Q15.4000234140625,15.4000234140625,15.4000234140625,15.0000244140625L15.4000234140625,12.5000244140625C15.4000244140625,12.1686534140625,15.6686534140625,11.9000244140625,16.0000244140625,11.9000244140625C16.3313964140625,11.9000244140625,16.6000254140625,12.1686534140625,16.6000254140625,12.5000244140625L16.6000244140625,12.5010944140625Z" fill-rule="evenodd" fill="#555555" fill-opacity="1"/></g></g></svg>`;
|
|
18869
|
+
const mathSVG = `<svg t="1756107836493" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10608" width="16" height="15"><path d="M877.454222 856.177778q4.835556-4.835556 7.395556-11.093334 2.616889-6.257778 2.616889-13.084444 0-3.413333-0.625778-6.656-0.682667-3.299556-1.991111-6.428444-1.251556-3.072-3.128889-5.859556-1.877333-2.844444-4.266667-5.176889-2.332444-2.389333-5.12-4.266667-2.844444-1.877333-5.916444-3.128888-3.128889-1.308444-6.428445-1.934223-3.299556-0.682667-6.656-0.682666-6.826667 0-13.084444 2.616889-6.257778 2.56-11.036445 7.395555l-54.044444 53.987556H253.155556l325.688888-325.745778q2.389333-2.389333 4.266667-5.12 1.877333-2.844444 3.128889-5.916445 1.308444-3.128889 1.934222-6.428444 0.682667-3.299556 0.682667-6.656 0-3.413333-0.682667-6.656-0.625778-3.299556-1.934222-6.428444-1.251556-3.072-3.128889-5.859556-1.877333-2.844444-4.266667-5.176889L253.155556 162.133333h522.126222l53.930666 53.987556q4.835556 4.835556 11.093334 7.395555 6.257778 2.616889 13.084444 2.616889 3.413333 0 6.656-0.682666 3.299556-0.625778 6.428445-1.934223 3.072-1.251556 5.859555-3.128888 2.844444-1.877333 5.176889-4.266667 2.389333-2.389333 4.266667-5.12 1.877333-2.844444 3.128889-5.916445 1.308444-3.128889 1.934222-6.428444 0.682667-3.299556 0.682667-6.656 0-6.826667-2.616889-13.084444-2.56-6.257778-7.395556-11.036445l-64-64q-4.778667-4.835556-11.036444-7.395555-6.257778-2.616889-13.084445-2.616889H170.666667q-6.826667 0-13.084445 2.616889-6.257778 2.56-11.036444 7.395555-2.389333 2.389333-4.266667 5.12-1.877333 2.844444-3.128889 5.916445-1.308444 3.128889-1.934222 6.428444-0.682667 3.299556-0.682667 6.656 0 3.413333 0.682667 6.656 0.625778 3.299556 1.934222 6.428444 1.251556 3.072 3.128889 5.859556 1.877333 2.844444 4.266667 5.176889L506.311111 512l-359.822222 359.879111q-4.835556 4.778667-7.395556 11.036445-2.616889 6.257778-2.616889 13.084444 0 3.413333 0.682667 6.656 0.625778 3.299556 1.934222 6.428444 1.251556 3.072 3.128889 5.859556 1.877333 2.844444 4.266667 5.176889 2.389333 2.389333 5.12 4.266667 2.844444 1.877333 5.916444 3.128888 3.128889 1.308444 6.428445 1.991112 3.299556 0.625778 6.656 0.625777h618.666666q6.826667 0 13.084445-2.616889 6.257778-2.56 11.036444-7.395555l64-63.943111z" p-id="10609" fill="#555555"></path></svg>`;
|
|
18870
|
+
const imageSVG = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><g><g style="opacity:0;"><rect x="0" y="0" width="18" height="18" rx="0" fill="#FFFFFF" fill-opacity="1"/></g><g><path d="M1.87471507,3.83578219Q1.5,4.18540478,1.5,4.6875L1.5,14.312503Q1.50000006,14.814598,1.874716,15.16422Q2.23459671,15.5,2.73684216,15.5L15.263157,15.5Q15.765403,15.5,16.125284,15.164218Q16.499999000000003,14.814597,16.499999000000003,14.312501L16.499999000000003,4.6875Q16.499999000000003,4.18540342,16.125284999999998,3.83578214Q15.765404,3.5,15.263157,3.5L2.73684216,3.5Q2.23459646,3.5,1.87471507,3.83578219ZM2.5,14.312503L2.5,4.6875Q2.5,4.5,2.73684216,4.5L15.263157,4.5Q15.5,4.5,15.5,4.6875L15.5,14.312501Q15.5,14.5,15.263157,14.5L2.73684216,14.5Q2.5,14.5,2.5,14.312503Z" fill-rule="evenodd" fill="#555555" fill-opacity="1" style="mix-blend-mode:passthrough"/></g><g><ellipse cx="5.4375" cy="7.4375" rx="0.4375" ry="0.4375" fill-opacity="0" stroke-opacity="1" stroke="#555555" fill="none" stroke-width="1" stroke-linecap="ROUND" stroke-linejoin="round" style="mix-blend-mode:passthrough"/></g><g><path d="M5.9053998,9.924615948146972L1.7143693,12.841608238146973Q1.61364189,12.911715538146973,1.55682093,13.020492338146973Q1.5,13.129269138146974,1.5,13.251992238146972L1.50000003,14.418008338146972Q1.50000003,14.876594038146973,1.84130602,15.195924738146973Q2.16843581,15.501991738146973,2.62437022,15.501991738146973L15.375628,15.501991738146973Q15.831564,15.501991738146973,16.158693,15.195924738146973Q16.5,14.876594038146973,16.5,14.418007838146973L16.5,13.251992238146972Q16.500000999999997,13.186988838146974,16.48338,13.124146438146973Q16.466759,13.061303638146972,16.434621,13.004799838146972Q16.402485,12.948296338146973,16.356969,12.901887938146972Q16.311453,12.855479738146972,16.255583,12.822251838146972L9.8796926,9.030259398146972Q9.842938400000001,9.008400078146973,9.8030057,8.993099628146974Q9.763073,8.977799118146972,9.721121799999999,8.969501908146972Q9.6791716,8.961204618146972,9.6364217,8.960151608146973Q9.5936708,8.959098578146973,9.551362000000001,8.965320438146973Q9.5090542,8.971542238146972,9.4684162,8.984858218146973Q9.427778199999999,8.998174158146973,9.3899918,9.018197478146973Q9.352206200000001,9.038220708146973,9.3183689,9.064369648146972Q9.284532500000001,9.090518598146973,9.2556267,9.122033748146972L7.6887164,10.830422738146973L6.4904227,9.934544588146972Q6.4273362,9.887379288146972,6.3528042,9.861893948146973Q6.2782726,9.836408678146972,6.1995153,9.835072038146972Q6.1207581,9.833735408146973,6.045404,9.856676968146973Q5.9700503000000005,9.879618528146972,5.9053998,9.924615948146972ZM2.5,13.513173138146973L2.50000006,14.418008338146972Q2.50000006,14.501992238146972,2.62437022,14.501992238146972L15.375628,14.501992238146972Q15.5,14.501992238146972,15.5,14.418007838146973L15.5,13.536368338146973L9.7178593,10.097503488146973L8.1200023,11.839632738146973Q8.0888524,11.873595438146973,8.052019600000001,11.901292338146973Q8.0151863,11.928988938146972,7.9739118,11.949486538146973Q7.9326363,11.969984038146972,7.88831,11.982591638146973Q7.8439837,11.995199238146974,7.7980995,11.999492138146973Q7.7522154,12.003785338146972,7.7063198,11.999619238146973Q7.6604242,11.995453338146973,7.6160631,11.982968338146973Q7.571702,11.970483338146973,7.5303702,11.950099938146973Q7.4890385,11.929716538146973,7.4521289,11.902122038146972L6.1805682,10.951467238146973L2.5,13.513173138146973Z" fill-rule="evenodd" fill="#555555" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>`;
|
|
20375
18871
|
|
|
20376
18872
|
const QuillEditor = vue.defineComponent({
|
|
20377
18873
|
name: 'QuillEditor',
|
|
@@ -20461,9 +18957,15 @@
|
|
|
20461
18957
|
const canUseLink = vue.ref(false);
|
|
20462
18958
|
const linkPosition = vue.ref({ top: 0, left: 0 });
|
|
20463
18959
|
const savedRange = vue.ref(null);
|
|
18960
|
+
const { addClickHandler } = useGlobalClick();
|
|
20464
18961
|
const { setQuill, handleBlotFormatterClick, configureBlotFormatter, applyImageStyle, registerBlotFormatter, getBlotFormatterConfig } = useBlotFormatter(editor, props.enableImageResize);
|
|
20465
18962
|
const { setQuill: setLinkQuill, setHandleCustomLink, addLinkClickListener } = useLinkClick(editor);
|
|
20466
|
-
|
|
18963
|
+
vue.onMounted(() => {
|
|
18964
|
+
initialize();
|
|
18965
|
+
});
|
|
18966
|
+
vue.onBeforeUnmount(() => {
|
|
18967
|
+
quill = null;
|
|
18968
|
+
});
|
|
20467
18969
|
let quill;
|
|
20468
18970
|
let options;
|
|
20469
18971
|
const editorWrapClass = vue.computed(() => {
|
|
@@ -20561,6 +19063,77 @@
|
|
|
20561
19063
|
}
|
|
20562
19064
|
}
|
|
20563
19065
|
};
|
|
19066
|
+
const initialize = () => {
|
|
19067
|
+
var _a;
|
|
19068
|
+
if (!editor.value)
|
|
19069
|
+
return;
|
|
19070
|
+
if (props.enableImageResize) {
|
|
19071
|
+
registerBlotFormatter();
|
|
19072
|
+
}
|
|
19073
|
+
options = composeOptions();
|
|
19074
|
+
setIcons();
|
|
19075
|
+
quill = new Quill(editor.value, options);
|
|
19076
|
+
setQuill(quill);
|
|
19077
|
+
setLinkQuill(quill);
|
|
19078
|
+
controlToolbarVisible(false);
|
|
19079
|
+
setContents(props.content);
|
|
19080
|
+
quill.on('text-change', handleTextChange);
|
|
19081
|
+
quill.on('selection-change', handleSelectionChange);
|
|
19082
|
+
quill.on('editor-change', handleEditorChange);
|
|
19083
|
+
quill.on('text-change', updateHistoryState);
|
|
19084
|
+
quill.on('selection-change', updateHistoryState);
|
|
19085
|
+
addLinkClickListener();
|
|
19086
|
+
const toolbarClickHandler = (event) => {
|
|
19087
|
+
var _a;
|
|
19088
|
+
const target = event.target;
|
|
19089
|
+
const clickedEditorContainer = target.closest('.quill-editor-container');
|
|
19090
|
+
if (clickedEditorContainer) {
|
|
19091
|
+
const currentEditorContainer = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.closest('.quill-editor-container');
|
|
19092
|
+
if (clickedEditorContainer === currentEditorContainer) {
|
|
19093
|
+
controlToolbarVisible(true);
|
|
19094
|
+
}
|
|
19095
|
+
else {
|
|
19096
|
+
controlToolbarVisible(false);
|
|
19097
|
+
}
|
|
19098
|
+
}
|
|
19099
|
+
else {
|
|
19100
|
+
controlToolbarVisible(false);
|
|
19101
|
+
}
|
|
19102
|
+
};
|
|
19103
|
+
addClickHandler(toolbarClickHandler);
|
|
19104
|
+
addClickHandler(handleBlotFormatterClick);
|
|
19105
|
+
addClickHandler(() => {
|
|
19106
|
+
handleCustomLink(false);
|
|
19107
|
+
});
|
|
19108
|
+
updateHistoryState();
|
|
19109
|
+
const toolbarDom = (_a = quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container;
|
|
19110
|
+
vue.nextTick(() => {
|
|
19111
|
+
const customLinkBtn = toolbarDom.querySelector('.ql-customLink');
|
|
19112
|
+
if (customLinkBtn) {
|
|
19113
|
+
customLinkBtn.addEventListener('click', (e) => {
|
|
19114
|
+
e.preventDefault();
|
|
19115
|
+
e.stopPropagation();
|
|
19116
|
+
if (canUseLink.value) {
|
|
19117
|
+
handleCustomLink(true);
|
|
19118
|
+
}
|
|
19119
|
+
});
|
|
19120
|
+
}
|
|
19121
|
+
});
|
|
19122
|
+
const tooltipInput = toolbarDom.querySelector('.ql-tooltip input');
|
|
19123
|
+
if (tooltipInput) {
|
|
19124
|
+
vue.nextTick(() => {
|
|
19125
|
+
tooltipInput.setAttribute('placeholder', props.placeholder);
|
|
19126
|
+
});
|
|
19127
|
+
}
|
|
19128
|
+
if (!props.needCollapse && props.toolbarStyle) {
|
|
19129
|
+
applyToolbarStyle();
|
|
19130
|
+
}
|
|
19131
|
+
applyEditorStyle();
|
|
19132
|
+
if (props.enableImageResize) {
|
|
19133
|
+
configureBlotFormatter();
|
|
19134
|
+
}
|
|
19135
|
+
ctx.emit('ready', quill);
|
|
19136
|
+
};
|
|
20564
19137
|
const composeOptions = () => {
|
|
20565
19138
|
const clientOptions = {};
|
|
20566
19139
|
clientOptions.theme = 'snow';
|
|
@@ -20776,6 +19349,14 @@
|
|
|
20776
19349
|
const focus = () => {
|
|
20777
19350
|
quill === null || quill === void 0 ? void 0 : quill.focus();
|
|
20778
19351
|
};
|
|
19352
|
+
const reinit = () => {
|
|
19353
|
+
vue.nextTick(() => {
|
|
19354
|
+
var _a;
|
|
19355
|
+
if (!ctx.slots.toolbar && quill)
|
|
19356
|
+
(_a = quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container.remove();
|
|
19357
|
+
initialize();
|
|
19358
|
+
});
|
|
19359
|
+
};
|
|
20779
19360
|
const moreToolbarToolClick = (tool) => {
|
|
20780
19361
|
var _a, _b;
|
|
20781
19362
|
if (!quill)
|
|
@@ -20886,91 +19467,6 @@
|
|
|
20886
19467
|
if (quill)
|
|
20887
19468
|
quill.enable(newValue);
|
|
20888
19469
|
});
|
|
20889
|
-
const initialize = () => {
|
|
20890
|
-
var _a;
|
|
20891
|
-
if (!editor.value)
|
|
20892
|
-
return;
|
|
20893
|
-
if (props.enableImageResize) {
|
|
20894
|
-
registerBlotFormatter();
|
|
20895
|
-
}
|
|
20896
|
-
options = composeOptions();
|
|
20897
|
-
setIcons();
|
|
20898
|
-
quill = new Quill(editor.value, options);
|
|
20899
|
-
setQuill(quill);
|
|
20900
|
-
setLinkQuill(quill);
|
|
20901
|
-
controlToolbarVisible(false);
|
|
20902
|
-
setContents(props.content);
|
|
20903
|
-
quill.on('text-change', handleTextChange);
|
|
20904
|
-
quill.on('selection-change', handleSelectionChange);
|
|
20905
|
-
quill.on('editor-change', handleEditorChange);
|
|
20906
|
-
quill.on('text-change', updateHistoryState);
|
|
20907
|
-
quill.on('selection-change', updateHistoryState);
|
|
20908
|
-
addLinkClickListener();
|
|
20909
|
-
const toolbarClickHandler = (event) => {
|
|
20910
|
-
var _a;
|
|
20911
|
-
const target = event.target;
|
|
20912
|
-
const clickedEditorContainer = target.closest('.quill-editor-container');
|
|
20913
|
-
if (clickedEditorContainer) {
|
|
20914
|
-
const currentEditorContainer = (_a = editor.value) === null || _a === void 0 ? void 0 : _a.closest('.quill-editor-container');
|
|
20915
|
-
if (clickedEditorContainer === currentEditorContainer) {
|
|
20916
|
-
controlToolbarVisible(true);
|
|
20917
|
-
}
|
|
20918
|
-
else {
|
|
20919
|
-
controlToolbarVisible(false);
|
|
20920
|
-
}
|
|
20921
|
-
}
|
|
20922
|
-
else {
|
|
20923
|
-
controlToolbarVisible(false);
|
|
20924
|
-
}
|
|
20925
|
-
};
|
|
20926
|
-
addClickHandler(toolbarClickHandler);
|
|
20927
|
-
addClickHandler(handleBlotFormatterClick);
|
|
20928
|
-
addClickHandler(() => {
|
|
20929
|
-
handleCustomLink(false);
|
|
20930
|
-
});
|
|
20931
|
-
updateHistoryState();
|
|
20932
|
-
const toolbarDom = (_a = quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container;
|
|
20933
|
-
vue.nextTick(() => {
|
|
20934
|
-
const customLinkBtn = toolbarDom.querySelector('.ql-customLink');
|
|
20935
|
-
if (customLinkBtn) {
|
|
20936
|
-
customLinkBtn.addEventListener('click', (e) => {
|
|
20937
|
-
e.preventDefault();
|
|
20938
|
-
e.stopPropagation();
|
|
20939
|
-
if (canUseLink.value) {
|
|
20940
|
-
handleCustomLink(true);
|
|
20941
|
-
}
|
|
20942
|
-
});
|
|
20943
|
-
}
|
|
20944
|
-
});
|
|
20945
|
-
const tooltipInput = toolbarDom.querySelector('.ql-tooltip input');
|
|
20946
|
-
if (tooltipInput) {
|
|
20947
|
-
vue.nextTick(() => {
|
|
20948
|
-
tooltipInput.setAttribute('placeholder', props.placeholder);
|
|
20949
|
-
});
|
|
20950
|
-
}
|
|
20951
|
-
if (!props.needCollapse && props.toolbarStyle) {
|
|
20952
|
-
applyToolbarStyle();
|
|
20953
|
-
}
|
|
20954
|
-
applyEditorStyle();
|
|
20955
|
-
if (props.enableImageResize) {
|
|
20956
|
-
configureBlotFormatter();
|
|
20957
|
-
}
|
|
20958
|
-
ctx.emit('ready', quill);
|
|
20959
|
-
};
|
|
20960
|
-
const reinit = () => {
|
|
20961
|
-
vue.nextTick(() => {
|
|
20962
|
-
var _a;
|
|
20963
|
-
if (!ctx.slots.toolbar && quill)
|
|
20964
|
-
(_a = quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container.remove();
|
|
20965
|
-
initialize();
|
|
20966
|
-
});
|
|
20967
|
-
};
|
|
20968
|
-
vue.onMounted(() => {
|
|
20969
|
-
initialize();
|
|
20970
|
-
});
|
|
20971
|
-
vue.onBeforeUnmount(() => {
|
|
20972
|
-
quill = null;
|
|
20973
|
-
});
|
|
20974
19470
|
return {
|
|
20975
19471
|
editor,
|
|
20976
19472
|
editorWrapClass,
|
|
@@ -21002,7 +19498,9 @@
|
|
|
21002
19498
|
render() {
|
|
21003
19499
|
return [
|
|
21004
19500
|
vue.h('div', {
|
|
21005
|
-
class: this.editorWrapClass
|
|
19501
|
+
class: this.editorWrapClass, onClick: () => {
|
|
19502
|
+
this.handleCustomLink(false);
|
|
19503
|
+
}
|
|
21006
19504
|
}, [
|
|
21007
19505
|
this.$props.needCollapse && this.$props.editorKey && vue.h(MoreToolbar, {
|
|
21008
19506
|
editorKey: String(this.$props.editorKey),
|