pxx-vue-quill 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-quill.cjs.js +4 -11
- package/dist/vue-quill.cjs.prod.js +2 -2
- package/dist/vue-quill.esm-browser.js +140 -155
- package/dist/vue-quill.esm-browser.prod.js +2 -2
- package/dist/vue-quill.esm-bundler.js +4 -11
- package/dist/vue-quill.esm-bundler.prod.js +2 -2
- package/dist/vue-quill.global.js +4 -11
- package/dist/vue-quill.global.prod.js +2 -2
- package/package.json +1 -1
package/dist/vue-quill.cjs.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-08-
|
|
10
|
+
* Date: 2025-08-20T08:51:47.483Z
|
|
11
11
|
*/
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
@@ -146,15 +146,8 @@ const QuillEditor = vue.defineComponent({
|
|
|
146
146
|
toolbar.style.display = 'none';
|
|
147
147
|
}
|
|
148
148
|
const icons = Quill__default.import('ui/icons');
|
|
149
|
-
icons['ocr'] =
|
|
150
|
-
|
|
151
|
-
<path d="M3 3h12v12H3z" fill="none" stroke="currentColor" stroke-width="1.5"/>
|
|
152
|
-
<path d="M6 7h6M6 9h6M6 11h4" stroke="currentColor" stroke-width="1"/>
|
|
153
|
-
</svg>
|
|
154
|
-
`;
|
|
155
|
-
icons['custom-button'] = `
|
|
156
|
-
<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"><defs><clipPath id="master_svg0_6759_139354"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_6759_139354)"><g><path d="M15.423694,15.049834L15.424264,15.049264Q15.508656,14.964872,15.554328,14.85461Q15.6,14.744348,15.6,14.625Q15.6,14.565905,15.58847,14.507944Q15.576942,14.449986,15.554328,14.395388Q15.531713,14.340792,15.498882,14.291656Q15.466051,14.242521,15.424265,14.200735Q15.382479,14.158949,15.333343,14.126117Q15.284206,14.093286,15.229609,14.070671Q15.175013,14.048058,15.117053,14.036528Q15.059094,14.025,15,14.025Q14.880652,14.025,14.77039,14.070672Q14.660128,14.116344,14.575736,14.200736L13.626472,15.150001L4.4485275,15.150001L10.174264,9.424264Q10.2160501,9.3824773,10.2488813,9.3333416Q10.281712500000001,9.2842059,10.304327,9.229609499999999Q10.3269415,9.175012599999999,10.3384705,9.117054Q10.349999,9.0590944,10.349999,8.999999500000001Q10.349999,8.9409046,10.3384705,8.8829451Q10.3269415,8.8249855,10.304327,8.7703896Q10.281712500000001,8.715793099999999,10.2488813,8.6666574Q10.2160501,8.6175222,10.174264,8.575736L4.4485282,2.85000002L13.626472,2.85000002L14.575395,3.7989223L14.575736,3.7992642Q14.660127,3.8836554999999997,14.77039,3.9293277Q14.880651,3.9749999000000003,15,3.975Q15.059094,3.9749999000000003,15.117054,3.9634712Q15.175013,3.9519422,15.229609,3.9293275999999997Q15.284206,3.906713,15.333342,3.8738817Q15.382478,3.8410504000000003,15.424264,3.7992641000000003Q15.466051,3.7574776,15.498882,3.7083421000000003Q15.531713,3.6592064,15.554328,3.60461Q15.576942,3.5500134,15.588472,3.4920541Q15.6,3.4340948,15.6,3.375Q15.6,3.2556524,15.554328,3.1453898000000002Q15.508656,3.03512704,15.424264,2.9507357499999998L15.423856,2.9503274L14.299264,1.82573593Q14.214872,1.7413445699999999,14.10461,1.69567227Q13.994347,1.64999998,13.875,1.64999998L3,1.64999998Q2.88065257,1.64999998,2.77038994,1.69567227Q2.66012731,1.7413445699999999,2.57573593,1.82573593Q2.53394958,1.8675223,2.50111824,1.91665789Q2.46828693,1.96579346,2.44567233,2.02038996Q2.42305773,2.07498647,2.41152894,2.13294582Q2.4000000999999997,2.190905161,2.40000004,2.25Q2.4000000999999997,2.309094839,2.41152889,2.36705418Q2.42305773,2.42501353,2.44567233,2.47961004Q2.46828693,2.53420654,2.50111827,2.58334213Q2.53394958,2.6324777,2.57573593,2.67426407L8.9014721,9L2.57573593,15.325736Q2.49134457,15.410126,2.44567227,15.520389Q2.39999998,15.630651,2.39999998,15.75Q2.39999998,15.809094,2.41152883,15.867053Q2.42305768,15.925013,2.44567233,15.979609Q2.46828693,16.034204000000003,2.50111827,16.08334Q2.53394958,16.132476,2.57573593,16.174263Q2.6175223,16.216048999999998,2.66665787,16.24888Q2.71579343,16.281712,2.77038994,16.304327Q2.82498646,16.326940999999998,2.88294581,16.33847Q2.940905157,16.349998,3,16.349999L13.875,16.349999Q13.994347,16.349998,14.104609,16.304326Q14.214872,16.258654,14.299264,16.174264L15.423694,15.049834Z" fill-rule="evenodd" fill="#333333" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>
|
|
157
|
-
`;
|
|
149
|
+
icons['ocr'] = `<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="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="#333333" fill-opacity="1"/></g></g></svg>`;
|
|
150
|
+
icons['math'] = `<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"><defs><clipPath id="master_svg0_6759_139354"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_6759_139354)"><g><path d="M15.423694,15.049834L15.424264,15.049264Q15.508656,14.964872,15.554328,14.85461Q15.6,14.744348,15.6,14.625Q15.6,14.565905,15.58847,14.507944Q15.576942,14.449986,15.554328,14.395388Q15.531713,14.340792,15.498882,14.291656Q15.466051,14.242521,15.424265,14.200735Q15.382479,14.158949,15.333343,14.126117Q15.284206,14.093286,15.229609,14.070671Q15.175013,14.048058,15.117053,14.036528Q15.059094,14.025,15,14.025Q14.880652,14.025,14.77039,14.070672Q14.660128,14.116344,14.575736,14.200736L13.626472,15.150001L4.4485275,15.150001L10.174264,9.424264Q10.2160501,9.3824773,10.2488813,9.3333416Q10.281712500000001,9.2842059,10.304327,9.229609499999999Q10.3269415,9.175012599999999,10.3384705,9.117054Q10.349999,9.0590944,10.349999,8.999999500000001Q10.349999,8.9409046,10.3384705,8.8829451Q10.3269415,8.8249855,10.304327,8.7703896Q10.281712500000001,8.715793099999999,10.2488813,8.6666574Q10.2160501,8.6175222,10.174264,8.575736L4.4485282,2.85000002L13.626472,2.85000002L14.575395,3.7989223L14.575736,3.7992642Q14.660127,3.8836554999999997,14.77039,3.9293277Q14.880651,3.9749999000000003,15,3.975Q15.059094,3.9749999000000003,15.117054,3.9634712Q15.175013,3.9519422,15.229609,3.9293275999999997Q15.284206,3.906713,15.333342,3.8738817Q15.382478,3.8410504000000003,15.424264,3.7992641000000003Q15.466051,3.7574776,15.498882,3.7083421000000003Q15.531713,3.6592064,15.554328,3.60461Q15.576942,3.5500134,15.588472,3.4920541Q15.6,3.4340948,15.6,3.375Q15.6,3.2556524,15.554328,3.1453898000000002Q15.508656,3.03512704,15.424264,2.9507357499999998L15.423856,2.9503274L14.299264,1.82573593Q14.214872,1.7413445699999999,14.10461,1.69567227Q13.994347,1.64999998,13.875,1.64999998L3,1.64999998Q2.88065257,1.64999998,2.77038994,1.69567227Q2.66012731,1.7413445699999999,2.57573593,1.82573593Q2.53394958,1.8675223,2.50111824,1.91665789Q2.46828693,1.96579346,2.44567233,2.02038996Q2.42305773,2.07498647,2.41152894,2.13294582Q2.4000000999999997,2.190905161,2.40000004,2.25Q2.4000000999999997,2.309094839,2.41152889,2.36705418Q2.42305773,2.42501353,2.44567233,2.47961004Q2.46828693,2.53420654,2.50111827,2.58334213Q2.53394958,2.6324777,2.57573593,2.67426407L8.9014721,9L2.57573593,15.325736Q2.49134457,15.410126,2.44567227,15.520389Q2.39999998,15.630651,2.39999998,15.75Q2.39999998,15.809094,2.41152883,15.867053Q2.42305768,15.925013,2.44567233,15.979609Q2.46828693,16.034204000000003,2.50111827,16.08334Q2.53394958,16.132476,2.57573593,16.174263Q2.6175223,16.216048999999998,2.66665787,16.24888Q2.71579343,16.281712,2.77038994,16.304327Q2.82498646,16.326940999999998,2.88294581,16.33847Q2.940905157,16.349998,3,16.349999L13.875,16.349999Q13.994347,16.349998,14.104609,16.304326Q14.214872,16.258654,14.299264,16.174264L15.423694,15.049834Z" fill-rule="evenodd" fill="#333333" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>`;
|
|
158
151
|
options = composeOptions();
|
|
159
152
|
// Register modules
|
|
160
153
|
if (props.modules) {
|
|
@@ -203,7 +196,7 @@ const QuillEditor = vue.defineComponent({
|
|
|
203
196
|
container: [
|
|
204
197
|
...toolbarOptions.full,
|
|
205
198
|
['ocr'],
|
|
206
|
-
[{ '
|
|
199
|
+
[{ 'math': true }], // 自定义按钮
|
|
207
200
|
],
|
|
208
201
|
handlers: {
|
|
209
202
|
ocr: function () {
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-08-
|
|
10
|
+
* Date: 2025-08-20T08:51:47.483Z
|
|
11
11
|
*/
|
|
12
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("quill"),t=require("quill-delta"),o=require("vue"),n=require("quill-blot-formatter");function l(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=l(e),i=l(t),a=l(n);const s={full:[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],["image"]]},u=o.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object,Boolean],required:!1,validator:e=>!!e&&("string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(s).indexOf(e)))},modules:{type:Object,required:!1,default:()=>({name:"blotFormatter",module:a})},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready","ocr","math"],setup:(e,t)=>{let n,l;o.onMounted((()=>{d()})),o.onBeforeUnmount((()=>{n=null}));const a=o.ref(),u=(e,t)=>{r.register(e,t)},d=()=>{var o,i;if(!a.value)return;n=new r(a.value,l);const s=null===(o=null==n?void 0:n.getModule("toolbar"))||void 0===o?void 0:o.container;s&&(s.style.display="none");const d=r.import("ui/icons");if(d.ocr='\n <svg viewBox="0 0 18 18">\n <path d="M3 3h12v12H3z" fill="none" stroke="currentColor" stroke-width="1.5"/>\n <path d="M6 7h6M6 9h6M6 11h4" stroke="currentColor" stroke-width="1"/>\n </svg>\n ',d["custom-button"]='\n <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"><defs><clipPath id="master_svg0_6759_139354"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_6759_139354)"><g><path d="M15.423694,15.049834L15.424264,15.049264Q15.508656,14.964872,15.554328,14.85461Q15.6,14.744348,15.6,14.625Q15.6,14.565905,15.58847,14.507944Q15.576942,14.449986,15.554328,14.395388Q15.531713,14.340792,15.498882,14.291656Q15.466051,14.242521,15.424265,14.200735Q15.382479,14.158949,15.333343,14.126117Q15.284206,14.093286,15.229609,14.070671Q15.175013,14.048058,15.117053,14.036528Q15.059094,14.025,15,14.025Q14.880652,14.025,14.77039,14.070672Q14.660128,14.116344,14.575736,14.200736L13.626472,15.150001L4.4485275,15.150001L10.174264,9.424264Q10.2160501,9.3824773,10.2488813,9.3333416Q10.281712500000001,9.2842059,10.304327,9.229609499999999Q10.3269415,9.175012599999999,10.3384705,9.117054Q10.349999,9.0590944,10.349999,8.999999500000001Q10.349999,8.9409046,10.3384705,8.8829451Q10.3269415,8.8249855,10.304327,8.7703896Q10.281712500000001,8.715793099999999,10.2488813,8.6666574Q10.2160501,8.6175222,10.174264,8.575736L4.4485282,2.85000002L13.626472,2.85000002L14.575395,3.7989223L14.575736,3.7992642Q14.660127,3.8836554999999997,14.77039,3.9293277Q14.880651,3.9749999000000003,15,3.975Q15.059094,3.9749999000000003,15.117054,3.9634712Q15.175013,3.9519422,15.229609,3.9293275999999997Q15.284206,3.906713,15.333342,3.8738817Q15.382478,3.8410504000000003,15.424264,3.7992641000000003Q15.466051,3.7574776,15.498882,3.7083421000000003Q15.531713,3.6592064,15.554328,3.60461Q15.576942,3.5500134,15.588472,3.4920541Q15.6,3.4340948,15.6,3.375Q15.6,3.2556524,15.554328,3.1453898000000002Q15.508656,3.03512704,15.424264,2.9507357499999998L15.423856,2.9503274L14.299264,1.82573593Q14.214872,1.7413445699999999,14.10461,1.69567227Q13.994347,1.64999998,13.875,1.64999998L3,1.64999998Q2.88065257,1.64999998,2.77038994,1.69567227Q2.66012731,1.7413445699999999,2.57573593,1.82573593Q2.53394958,1.8675223,2.50111824,1.91665789Q2.46828693,1.96579346,2.44567233,2.02038996Q2.42305773,2.07498647,2.41152894,2.13294582Q2.4000000999999997,2.190905161,2.40000004,2.25Q2.4000000999999997,2.309094839,2.41152889,2.36705418Q2.42305773,2.42501353,2.44567233,2.47961004Q2.46828693,2.53420654,2.50111827,2.58334213Q2.53394958,2.6324777,2.57573593,2.67426407L8.9014721,9L2.57573593,15.325736Q2.49134457,15.410126,2.44567227,15.520389Q2.39999998,15.630651,2.39999998,15.75Q2.39999998,15.809094,2.41152883,15.867053Q2.42305768,15.925013,2.44567233,15.979609Q2.46828693,16.034204000000003,2.50111827,16.08334Q2.53394958,16.132476,2.57573593,16.174263Q2.6175223,16.216048999999998,2.66665787,16.24888Q2.71579343,16.281712,2.77038994,16.304327Q2.82498646,16.326940999999998,2.88294581,16.33847Q2.940905157,16.349998,3,16.349999L13.875,16.349999Q13.994347,16.349998,14.104609,16.304326Q14.214872,16.258654,14.299264,16.174264L15.423694,15.049834Z" fill-rule="evenodd" fill="#333333" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>\n ',l=c(),e.modules)if(Array.isArray(e.modules))for(const t of e.modules)u(`modules/${t.name}`,t.module);else u(`modules/${e.modules.name}`,e.modules.module);n=new r(a.value,l),y(e.content),n.on("text-change",p),n.on("selection-change",Q),n.on("editor-change",f),"bubble"!==e.theme&&a.value.classList.remove("ql-bubble"),"snow"!==e.theme&&a.value.classList.remove("ql-snow"),null===(i=n.getModule("toolbar"))||void 0===i||i.container.addEventListener("mousedown",(e=>{e.preventDefault()})),t.emit("ready",n)},c=()=>{const o={};if(""!==e.theme&&(o.theme=e.theme),e.readOnly&&(o.readOnly=e.readOnly),e.placeholder&&(o.placeholder=e.placeholder),e.toolbar&&""!==e.toolbar&&(o.modules={toolbar:{container:[...s.full,["ocr"],[{"custom-button":!0}]],handlers:{ocr:function(){console.log("ocr"),t.emit("ocr")},math:function(){t.emit("math")}}}}),e.modules){const t=(()=>{var t,o;const n={};if(Array.isArray(e.modules))for(const l of e.modules)n[l.name]=null!==(t=l.options)&&void 0!==t?t:{};else n[e.modules.name]=null!==(o=e.modules.options)&&void 0!==o?o:{};return n})();o.modules=Object.assign({},o.modules,t)}return Object.assign({},e.globalOptions,e.options,o)},m=e=>"object"==typeof e&&e?e.slice():e;let v;const h=e=>{if(typeof v==typeof e){if(e===v)return!0;if("object"==typeof e&&e&&"object"==typeof v&&v)return t=v.diff(e),!Object.values(t.ops).some((e=>!e.retain||1!==Object.keys(e).length))}var t;return!1},p=(o,n,l)=>{v=m(b()),h(e.content)||t.emit("update:content",v),t.emit("textChange",{delta:o,oldContents:n,source:l})},g=o.ref(),Q=(e,o,l)=>{var r;g.value=!!(null==n?void 0:n.hasFocus());const i=null===(r=null==n?void 0:n.getModule("toolbar"))||void 0===r?void 0:r.container;i&&(i.style.display=g.value?"block":"none"),t.emit("selectionChange",{range:e,oldRange:o,source:l})};o.watch(g,(e=>{t.emit(e?"focus":"blur",a)}));const f=(...e)=>{"text-change"===e[0]&&t.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&t.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},b=(t,o)=>"html"===e.contentType?L():"text"===e.contentType?w(t,o):null==n?void 0:n.getContents(t,o),y=(t,o="api")=>{const l=t||("delta"===e.contentType?new i:"");"html"===e.contentType?T(l):"text"===e.contentType?x(l,o):null==n||n.setContents(l,o),v=m(l)},w=(e,t)=>{var o;return null!==(o=null==n?void 0:n.getText(e,t))&&void 0!==o?o:""},x=(e,t="api")=>{null==n||n.setText(e,t)},L=()=>{var e;return null!==(e=null==n?void 0:n.root.innerHTML)&&void 0!==e?e:""},T=e=>{n&&(n.root.innerHTML=e)};return o.watch((()=>e.content),(e=>{if(!n||!e||h(e))return;const t=n.getSelection();t&&o.nextTick((()=>null==n?void 0:n.setSelection(t))),y(e)}),{deep:!0}),o.watch((()=>e.enable),(e=>{n&&n.enable(e)})),{editor:a,getEditor:()=>a.value,getToolbar:()=>{var e;return null===(e=null==n?void 0:n.getModule("toolbar"))||void 0===e?void 0:e.container},getQuill:()=>{if(n)return n;throw'The quill editor hasn\'t been instantiated yet,\n make sure to call this method when the editor ready\n or use v-on:ready="onReady(quill)" event instead.'},getContents:b,setContents:y,getHTML:L,setHTML:T,pasteHTML:(e,t="api")=>{const o=null==n?void 0:n.clipboard.convert(e);o&&(null==n||n.setContents(o,t))},focus:()=>{null==n||n.focus()},getText:w,setText:x,reinit:()=>{o.nextTick((()=>{var e;!t.slots.toolbar&&n&&(null===(e=n.getModule("toolbar"))||void 0===e||e.container.remove()),d()}))}}},render(){var e,t;return[null===(t=(e=this.$slots).toolbar)||void 0===t?void 0:t.call(e),o.h("div",{ref:"editor",...this.$attrs})]}});exports.Quill=r,exports.Delta=i,exports.QuillEditor=u;
|
|
12
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("quill"),t=require("quill-delta"),o=require("vue"),l=require("quill-blot-formatter");function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=n(e),i=n(t),a=n(l);const s={full:[["bold","italic","underline"],[{list:"ordered"},{list:"bullet"}],[{color:[]},{background:[]}],["image"]]},d=o.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:e=>["delta","html","text"].includes(e)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:e=>["snow","bubble",""].includes(e)},toolbar:{type:[String,Array,Object,Boolean],required:!1,validator:e=>!!e&&("string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(s).indexOf(e)))},modules:{type:Object,required:!1,default:()=>({name:"blotFormatter",module:a})},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready","ocr","math"],setup:(e,t)=>{let l,n;o.onMounted((()=>{u()})),o.onBeforeUnmount((()=>{l=null}));const a=o.ref(),d=(e,t)=>{r.register(e,t)},u=()=>{var o,i;if(!a.value)return;l=new r(a.value,n);const s=null===(o=null==l?void 0:l.getModule("toolbar"))||void 0===o?void 0:o.container;s&&(s.style.display="none");const u=r.import("ui/icons");if(u.ocr='<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="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="#333333" fill-opacity="1"/></g></g></svg>',u.math='<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"><defs><clipPath id="master_svg0_6759_139354"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_6759_139354)"><g><path d="M15.423694,15.049834L15.424264,15.049264Q15.508656,14.964872,15.554328,14.85461Q15.6,14.744348,15.6,14.625Q15.6,14.565905,15.58847,14.507944Q15.576942,14.449986,15.554328,14.395388Q15.531713,14.340792,15.498882,14.291656Q15.466051,14.242521,15.424265,14.200735Q15.382479,14.158949,15.333343,14.126117Q15.284206,14.093286,15.229609,14.070671Q15.175013,14.048058,15.117053,14.036528Q15.059094,14.025,15,14.025Q14.880652,14.025,14.77039,14.070672Q14.660128,14.116344,14.575736,14.200736L13.626472,15.150001L4.4485275,15.150001L10.174264,9.424264Q10.2160501,9.3824773,10.2488813,9.3333416Q10.281712500000001,9.2842059,10.304327,9.229609499999999Q10.3269415,9.175012599999999,10.3384705,9.117054Q10.349999,9.0590944,10.349999,8.999999500000001Q10.349999,8.9409046,10.3384705,8.8829451Q10.3269415,8.8249855,10.304327,8.7703896Q10.281712500000001,8.715793099999999,10.2488813,8.6666574Q10.2160501,8.6175222,10.174264,8.575736L4.4485282,2.85000002L13.626472,2.85000002L14.575395,3.7989223L14.575736,3.7992642Q14.660127,3.8836554999999997,14.77039,3.9293277Q14.880651,3.9749999000000003,15,3.975Q15.059094,3.9749999000000003,15.117054,3.9634712Q15.175013,3.9519422,15.229609,3.9293275999999997Q15.284206,3.906713,15.333342,3.8738817Q15.382478,3.8410504000000003,15.424264,3.7992641000000003Q15.466051,3.7574776,15.498882,3.7083421000000003Q15.531713,3.6592064,15.554328,3.60461Q15.576942,3.5500134,15.588472,3.4920541Q15.6,3.4340948,15.6,3.375Q15.6,3.2556524,15.554328,3.1453898000000002Q15.508656,3.03512704,15.424264,2.9507357499999998L15.423856,2.9503274L14.299264,1.82573593Q14.214872,1.7413445699999999,14.10461,1.69567227Q13.994347,1.64999998,13.875,1.64999998L3,1.64999998Q2.88065257,1.64999998,2.77038994,1.69567227Q2.66012731,1.7413445699999999,2.57573593,1.82573593Q2.53394958,1.8675223,2.50111824,1.91665789Q2.46828693,1.96579346,2.44567233,2.02038996Q2.42305773,2.07498647,2.41152894,2.13294582Q2.4000000999999997,2.190905161,2.40000004,2.25Q2.4000000999999997,2.309094839,2.41152889,2.36705418Q2.42305773,2.42501353,2.44567233,2.47961004Q2.46828693,2.53420654,2.50111827,2.58334213Q2.53394958,2.6324777,2.57573593,2.67426407L8.9014721,9L2.57573593,15.325736Q2.49134457,15.410126,2.44567227,15.520389Q2.39999998,15.630651,2.39999998,15.75Q2.39999998,15.809094,2.41152883,15.867053Q2.42305768,15.925013,2.44567233,15.979609Q2.46828693,16.034204000000003,2.50111827,16.08334Q2.53394958,16.132476,2.57573593,16.174263Q2.6175223,16.216048999999998,2.66665787,16.24888Q2.71579343,16.281712,2.77038994,16.304327Q2.82498646,16.326940999999998,2.88294581,16.33847Q2.940905157,16.349998,3,16.349999L13.875,16.349999Q13.994347,16.349998,14.104609,16.304326Q14.214872,16.258654,14.299264,16.174264L15.423694,15.049834Z" fill-rule="evenodd" fill="#333333" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>',n=c(),e.modules)if(Array.isArray(e.modules))for(const t of e.modules)d(`modules/${t.name}`,t.module);else d(`modules/${e.modules.name}`,e.modules.module);l=new r(a.value,n),b(e.content),l.on("text-change",h),l.on("selection-change",p),l.on("editor-change",f),"bubble"!==e.theme&&a.value.classList.remove("ql-bubble"),"snow"!==e.theme&&a.value.classList.remove("ql-snow"),null===(i=l.getModule("toolbar"))||void 0===i||i.container.addEventListener("mousedown",(e=>{e.preventDefault()})),t.emit("ready",l)},c=()=>{const o={};if(""!==e.theme&&(o.theme=e.theme),e.readOnly&&(o.readOnly=e.readOnly),e.placeholder&&(o.placeholder=e.placeholder),e.toolbar&&""!==e.toolbar&&(o.modules={toolbar:{container:[...s.full,["ocr"],[{math:!0}]],handlers:{ocr:function(){console.log("ocr"),t.emit("ocr")},math:function(){t.emit("math")}}}}),e.modules){const t=(()=>{var t,o;const l={};if(Array.isArray(e.modules))for(const n of e.modules)l[n.name]=null!==(t=n.options)&&void 0!==t?t:{};else l[e.modules.name]=null!==(o=e.modules.options)&&void 0!==o?o:{};return l})();o.modules=Object.assign({},o.modules,t)}return Object.assign({},e.globalOptions,e.options,o)},g=e=>"object"==typeof e&&e?e.slice():e;let m;const Q=e=>{if(typeof m==typeof e){if(e===m)return!0;if("object"==typeof e&&e&&"object"==typeof m&&m)return t=m.diff(e),!Object.values(t.ops).some((e=>!e.retain||1!==Object.keys(e).length))}var t;return!1},h=(o,l,n)=>{m=g(y()),Q(e.content)||t.emit("update:content",m),t.emit("textChange",{delta:o,oldContents:l,source:n})},v=o.ref(),p=(e,o,n)=>{var r;v.value=!!(null==l?void 0:l.hasFocus());const i=null===(r=null==l?void 0:l.getModule("toolbar"))||void 0===r?void 0:r.container;i&&(i.style.display=v.value?"block":"none"),t.emit("selectionChange",{range:e,oldRange:o,source:n})};o.watch(v,(e=>{t.emit(e?"focus":"blur",a)}));const f=(...e)=>{"text-change"===e[0]&&t.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&t.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},y=(t,o)=>"html"===e.contentType?w():"text"===e.contentType?L(t,o):null==l?void 0:l.getContents(t,o),b=(t,o="api")=>{const n=t||("delta"===e.contentType?new i:"");"html"===e.contentType?x(n):"text"===e.contentType?C(n,o):null==l||l.setContents(n,o),m=g(n)},L=(e,t)=>{var o;return null!==(o=null==l?void 0:l.getText(e,t))&&void 0!==o?o:""},C=(e,t="api")=>{null==l||l.setText(e,t)},w=()=>{var e;return null!==(e=null==l?void 0:l.root.innerHTML)&&void 0!==e?e:""},x=e=>{l&&(l.root.innerHTML=e)};return o.watch((()=>e.content),(e=>{if(!l||!e||Q(e))return;const t=l.getSelection();t&&o.nextTick((()=>null==l?void 0:l.setSelection(t))),b(e)}),{deep:!0}),o.watch((()=>e.enable),(e=>{l&&l.enable(e)})),{editor:a,getEditor:()=>a.value,getToolbar:()=>{var e;return null===(e=null==l?void 0:l.getModule("toolbar"))||void 0===e?void 0:e.container},getQuill:()=>{if(l)return l;throw'The quill editor hasn\'t been instantiated yet,\n make sure to call this method when the editor ready\n or use v-on:ready="onReady(quill)" event instead.'},getContents:y,setContents:b,getHTML:w,setHTML:x,pasteHTML:(e,t="api")=>{const o=null==l?void 0:l.clipboard.convert(e);o&&(null==l||l.setContents(o,t))},focus:()=>{null==l||l.focus()},getText:L,setText:C,reinit:()=>{o.nextTick((()=>{var e;!t.slots.toolbar&&l&&(null===(e=l.getModule("toolbar"))||void 0===e||e.container.remove()),u()}))}}},render(){var e,t;return[null===(t=(e=this.$slots).toolbar)||void 0===t?void 0:t.call(e),o.h("div",{ref:"editor",...this.$attrs})]}});exports.Quill=r,exports.Delta=i,exports.QuillEditor=d;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2025 Pxx-Team
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2025-08-
|
|
10
|
+
* Date: 2025-08-20T08:51:47.483Z
|
|
11
11
|
*/
|
|
12
12
|
import { defineComponent, onMounted, onBeforeUnmount, ref, watch, nextTick, h } from 'vue';
|
|
13
13
|
|
|
@@ -18780,11 +18780,11 @@ Object.defineProperty(DefaultAligner$1, "__esModule", {
|
|
|
18780
18780
|
value: true
|
|
18781
18781
|
});
|
|
18782
18782
|
|
|
18783
|
-
var _createClass$
|
|
18783
|
+
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; }; }();
|
|
18784
18784
|
|
|
18785
18785
|
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; }
|
|
18786
18786
|
|
|
18787
|
-
function _classCallCheck$
|
|
18787
|
+
function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18788
18788
|
|
|
18789
18789
|
var LEFT_ALIGN = 'left';
|
|
18790
18790
|
var CENTER_ALIGN = 'center';
|
|
@@ -18795,7 +18795,7 @@ var DefaultAligner = function () {
|
|
|
18795
18795
|
var _this = this,
|
|
18796
18796
|
_alignments;
|
|
18797
18797
|
|
|
18798
|
-
_classCallCheck$
|
|
18798
|
+
_classCallCheck$2(this, DefaultAligner);
|
|
18799
18799
|
|
|
18800
18800
|
this.applyStyle = options.aligner.applyStyle;
|
|
18801
18801
|
this.alignAttribute = options.attribute;
|
|
@@ -18823,7 +18823,7 @@ var DefaultAligner = function () {
|
|
|
18823
18823
|
}), _alignments);
|
|
18824
18824
|
}
|
|
18825
18825
|
|
|
18826
|
-
_createClass$
|
|
18826
|
+
_createClass$2(DefaultAligner, [{
|
|
18827
18827
|
key: 'getAlignments',
|
|
18828
18828
|
value: function getAlignments() {
|
|
18829
18829
|
var _this2 = this;
|
|
@@ -19132,31 +19132,31 @@ Object.defineProperty(ResizeAction$1, "__esModule", {
|
|
|
19132
19132
|
value: true
|
|
19133
19133
|
});
|
|
19134
19134
|
|
|
19135
|
-
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; }; }();
|
|
19135
|
+
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; }; }();
|
|
19136
19136
|
|
|
19137
19137
|
var _Action2 = requireAction();
|
|
19138
19138
|
|
|
19139
|
-
var _Action3 = _interopRequireDefault(_Action2);
|
|
19139
|
+
var _Action3 = _interopRequireDefault$1(_Action2);
|
|
19140
19140
|
|
|
19141
|
-
var _BlotFormatter = requireBlotFormatter();
|
|
19141
|
+
var _BlotFormatter$1 = requireBlotFormatter();
|
|
19142
19142
|
|
|
19143
|
-
_interopRequireDefault(_BlotFormatter);
|
|
19143
|
+
_interopRequireDefault$1(_BlotFormatter$1);
|
|
19144
19144
|
|
|
19145
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19145
|
+
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19146
19146
|
|
|
19147
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19147
|
+
function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19148
19148
|
|
|
19149
|
-
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; }
|
|
19149
|
+
function _possibleConstructorReturn$1(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
19150
19150
|
|
|
19151
|
-
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; }
|
|
19151
|
+
function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
19152
19152
|
|
|
19153
19153
|
var ResizeAction = function (_Action) {
|
|
19154
|
-
_inherits(ResizeAction, _Action);
|
|
19154
|
+
_inherits$1(ResizeAction, _Action);
|
|
19155
19155
|
|
|
19156
19156
|
function ResizeAction(formatter) {
|
|
19157
|
-
_classCallCheck(this, ResizeAction);
|
|
19157
|
+
_classCallCheck$1(this, ResizeAction);
|
|
19158
19158
|
|
|
19159
|
-
var _this = _possibleConstructorReturn(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19159
|
+
var _this = _possibleConstructorReturn$1(this, (ResizeAction.__proto__ || Object.getPrototypeOf(ResizeAction)).call(this, formatter));
|
|
19160
19160
|
|
|
19161
19161
|
_this.onMouseDown = function (event) {
|
|
19162
19162
|
if (!(event.target instanceof HTMLElement)) {
|
|
@@ -19228,7 +19228,7 @@ var ResizeAction = function (_Action) {
|
|
|
19228
19228
|
return _this;
|
|
19229
19229
|
}
|
|
19230
19230
|
|
|
19231
|
-
_createClass(ResizeAction, [{
|
|
19231
|
+
_createClass$1(ResizeAction, [{
|
|
19232
19232
|
key: 'onCreate',
|
|
19233
19233
|
value: function onCreate() {
|
|
19234
19234
|
this.formatter.overlay.appendChild(this.topLeftHandle);
|
|
@@ -19540,156 +19540,148 @@ function requireImageSpec () {
|
|
|
19540
19540
|
|
|
19541
19541
|
var IframeVideoSpec = {};
|
|
19542
19542
|
|
|
19543
|
-
var UnclickableBlotSpec = {};
|
|
19544
|
-
|
|
19545
|
-
var hasRequiredUnclickableBlotSpec;
|
|
19546
|
-
|
|
19547
|
-
function requireUnclickableBlotSpec () {
|
|
19548
|
-
if (hasRequiredUnclickableBlotSpec) return UnclickableBlotSpec;
|
|
19549
|
-
hasRequiredUnclickableBlotSpec = 1;
|
|
19543
|
+
var UnclickableBlotSpec$1 = {};
|
|
19550
19544
|
|
|
19551
|
-
|
|
19552
|
-
|
|
19553
|
-
|
|
19554
|
-
|
|
19555
|
-
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; }; }();
|
|
19545
|
+
Object.defineProperty(UnclickableBlotSpec$1, "__esModule", {
|
|
19546
|
+
value: true
|
|
19547
|
+
});
|
|
19556
19548
|
|
|
19557
|
-
|
|
19549
|
+
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; }; }();
|
|
19558
19550
|
|
|
19559
|
-
|
|
19551
|
+
var _BlotSpec2 = requireBlotSpec();
|
|
19560
19552
|
|
|
19561
|
-
|
|
19553
|
+
var _BlotSpec3 = _interopRequireDefault(_BlotSpec2);
|
|
19562
19554
|
|
|
19563
|
-
|
|
19555
|
+
var _BlotFormatter = requireBlotFormatter();
|
|
19564
19556
|
|
|
19565
|
-
|
|
19557
|
+
_interopRequireDefault(_BlotFormatter);
|
|
19566
19558
|
|
|
19567
|
-
|
|
19559
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19568
19560
|
|
|
19569
|
-
|
|
19561
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19570
19562
|
|
|
19571
|
-
|
|
19563
|
+
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; }
|
|
19572
19564
|
|
|
19573
|
-
|
|
19574
|
-
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19565
|
+
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; }
|
|
19575
19566
|
|
|
19576
|
-
|
|
19577
|
-
|
|
19567
|
+
var MOUSE_ENTER_ATTRIBUTE = 'data-blot-formatter-unclickable-bound';
|
|
19568
|
+
var PROXY_IMAGE_CLASS = 'blot-formatter__proxy-image';
|
|
19578
19569
|
|
|
19579
|
-
|
|
19580
|
-
|
|
19570
|
+
var UnclickableBlotSpec = function (_BlotSpec) {
|
|
19571
|
+
_inherits(UnclickableBlotSpec, _BlotSpec);
|
|
19581
19572
|
|
|
19582
|
-
|
|
19573
|
+
function UnclickableBlotSpec(formatter, selector) {
|
|
19574
|
+
_classCallCheck(this, UnclickableBlotSpec);
|
|
19583
19575
|
|
|
19584
|
-
|
|
19585
|
-
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19586
|
-
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19587
|
-
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19588
|
-
});
|
|
19589
|
-
};
|
|
19576
|
+
var _this = _possibleConstructorReturn(this, (UnclickableBlotSpec.__proto__ || Object.getPrototypeOf(UnclickableBlotSpec)).call(this, formatter));
|
|
19590
19577
|
|
|
19591
|
-
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
|
|
19595
|
-
|
|
19578
|
+
_this.onTextChange = function () {
|
|
19579
|
+
Array.from(document.querySelectorAll(_this.selector + ':not([' + MOUSE_ENTER_ATTRIBUTE + '])')).forEach(function (unclickable) {
|
|
19580
|
+
unclickable.setAttribute(MOUSE_ENTER_ATTRIBUTE, 'true');
|
|
19581
|
+
unclickable.addEventListener('mouseenter', _this.onMouseEnter);
|
|
19582
|
+
});
|
|
19583
|
+
};
|
|
19596
19584
|
|
|
19597
|
-
|
|
19598
|
-
|
|
19599
|
-
|
|
19585
|
+
_this.onMouseEnter = function (event) {
|
|
19586
|
+
var unclickable = event.target;
|
|
19587
|
+
if (!(unclickable instanceof HTMLElement)) {
|
|
19588
|
+
return;
|
|
19589
|
+
}
|
|
19600
19590
|
|
|
19601
|
-
|
|
19602
|
-
|
|
19603
|
-
|
|
19604
|
-
_this.formatter.show(_this);
|
|
19605
|
-
_this.hideProxyImage();
|
|
19606
|
-
};
|
|
19591
|
+
_this.nextUnclickable = unclickable;
|
|
19592
|
+
_this.repositionProxyImage(_this.nextUnclickable);
|
|
19593
|
+
};
|
|
19607
19594
|
|
|
19608
|
-
|
|
19609
|
-
|
|
19610
|
-
|
|
19611
|
-
|
|
19612
|
-
|
|
19595
|
+
_this.onProxyImageClick = function () {
|
|
19596
|
+
_this.unclickable = _this.nextUnclickable;
|
|
19597
|
+
_this.nextUnclickable = null;
|
|
19598
|
+
_this.formatter.show(_this);
|
|
19599
|
+
_this.hideProxyImage();
|
|
19600
|
+
};
|
|
19613
19601
|
|
|
19614
|
-
|
|
19615
|
-
|
|
19616
|
-
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
it's important that this is attached to the body instead of the root quill element.
|
|
19620
|
-
this prevents the click event from overlapping with ImageSpec
|
|
19621
|
-
*/
|
|
19622
|
-
document.body.appendChild(this.createProxyImage());
|
|
19623
|
-
}
|
|
19602
|
+
_this.selector = selector;
|
|
19603
|
+
_this.unclickable = null;
|
|
19604
|
+
_this.nextUnclickable = null;
|
|
19605
|
+
return _this;
|
|
19606
|
+
}
|
|
19624
19607
|
|
|
19625
|
-
|
|
19626
|
-
|
|
19627
|
-
|
|
19628
|
-
|
|
19629
|
-
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
|
|
19633
|
-
|
|
19634
|
-
|
|
19635
|
-
key: 'getOverlayElement',
|
|
19636
|
-
value: function getOverlayElement() {
|
|
19637
|
-
return this.unclickable;
|
|
19638
|
-
}
|
|
19639
|
-
}, {
|
|
19640
|
-
key: 'onHide',
|
|
19641
|
-
value: function onHide() {
|
|
19642
|
-
this.hideProxyImage();
|
|
19643
|
-
this.nextUnclickable = null;
|
|
19644
|
-
this.unclickable = null;
|
|
19645
|
-
}
|
|
19646
|
-
}, {
|
|
19647
|
-
key: 'createProxyImage',
|
|
19648
|
-
value: function createProxyImage() {
|
|
19649
|
-
var canvas = document.createElement('canvas');
|
|
19650
|
-
var context = canvas.getContext('2d');
|
|
19651
|
-
context.globalAlpha = 0;
|
|
19652
|
-
context.fillRect(0, 0, 1, 1);
|
|
19653
|
-
|
|
19654
|
-
this.proxyImage = document.createElement('img');
|
|
19655
|
-
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19656
|
-
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19657
|
-
|
|
19658
|
-
Object.assign(this.proxyImage.style, {
|
|
19659
|
-
position: 'absolute',
|
|
19660
|
-
margin: '0'
|
|
19661
|
-
});
|
|
19608
|
+
_createClass(UnclickableBlotSpec, [{
|
|
19609
|
+
key: 'init',
|
|
19610
|
+
value: function init() {
|
|
19611
|
+
if (document.body) {
|
|
19612
|
+
/*
|
|
19613
|
+
it's important that this is attached to the body instead of the root quill element.
|
|
19614
|
+
this prevents the click event from overlapping with ImageSpec
|
|
19615
|
+
*/
|
|
19616
|
+
document.body.appendChild(this.createProxyImage());
|
|
19617
|
+
}
|
|
19662
19618
|
|
|
19663
|
-
|
|
19664
|
-
|
|
19665
|
-
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
|
|
19672
|
-
|
|
19673
|
-
|
|
19674
|
-
|
|
19675
|
-
|
|
19619
|
+
this.hideProxyImage();
|
|
19620
|
+
this.proxyImage.addEventListener('click', this.onProxyImageClick);
|
|
19621
|
+
this.formatter.quill.on('text-change', this.onTextChange);
|
|
19622
|
+
}
|
|
19623
|
+
}, {
|
|
19624
|
+
key: 'getTargetElement',
|
|
19625
|
+
value: function getTargetElement() {
|
|
19626
|
+
return this.unclickable;
|
|
19627
|
+
}
|
|
19628
|
+
}, {
|
|
19629
|
+
key: 'getOverlayElement',
|
|
19630
|
+
value: function getOverlayElement() {
|
|
19631
|
+
return this.unclickable;
|
|
19632
|
+
}
|
|
19633
|
+
}, {
|
|
19634
|
+
key: 'onHide',
|
|
19635
|
+
value: function onHide() {
|
|
19636
|
+
this.hideProxyImage();
|
|
19637
|
+
this.nextUnclickable = null;
|
|
19638
|
+
this.unclickable = null;
|
|
19639
|
+
}
|
|
19640
|
+
}, {
|
|
19641
|
+
key: 'createProxyImage',
|
|
19642
|
+
value: function createProxyImage() {
|
|
19643
|
+
var canvas = document.createElement('canvas');
|
|
19644
|
+
var context = canvas.getContext('2d');
|
|
19645
|
+
context.globalAlpha = 0;
|
|
19646
|
+
context.fillRect(0, 0, 1, 1);
|
|
19647
|
+
|
|
19648
|
+
this.proxyImage = document.createElement('img');
|
|
19649
|
+
this.proxyImage.src = canvas.toDataURL('image/png');
|
|
19650
|
+
this.proxyImage.classList.add(PROXY_IMAGE_CLASS);
|
|
19651
|
+
|
|
19652
|
+
Object.assign(this.proxyImage.style, {
|
|
19653
|
+
position: 'absolute',
|
|
19654
|
+
margin: '0'
|
|
19655
|
+
});
|
|
19676
19656
|
|
|
19677
|
-
|
|
19678
|
-
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
|
|
19682
|
-
|
|
19683
|
-
|
|
19684
|
-
|
|
19685
|
-
|
|
19657
|
+
return this.proxyImage;
|
|
19658
|
+
}
|
|
19659
|
+
}, {
|
|
19660
|
+
key: 'hideProxyImage',
|
|
19661
|
+
value: function hideProxyImage() {
|
|
19662
|
+
Object.assign(this.proxyImage.style, {
|
|
19663
|
+
display: 'none'
|
|
19664
|
+
});
|
|
19665
|
+
}
|
|
19666
|
+
}, {
|
|
19667
|
+
key: 'repositionProxyImage',
|
|
19668
|
+
value: function repositionProxyImage(unclickable) {
|
|
19669
|
+
var rect = unclickable.getBoundingClientRect();
|
|
19670
|
+
|
|
19671
|
+
Object.assign(this.proxyImage.style, {
|
|
19672
|
+
display: 'block',
|
|
19673
|
+
left: rect.left + window.pageXOffset + 'px',
|
|
19674
|
+
top: rect.top + window.pageYOffset + 'px',
|
|
19675
|
+
width: rect.width + 'px',
|
|
19676
|
+
height: rect.height + 'px'
|
|
19677
|
+
});
|
|
19678
|
+
}
|
|
19679
|
+
}]);
|
|
19686
19680
|
|
|
19687
|
-
|
|
19688
|
-
|
|
19681
|
+
return UnclickableBlotSpec;
|
|
19682
|
+
}(_BlotSpec3.default);
|
|
19689
19683
|
|
|
19690
|
-
|
|
19691
|
-
return UnclickableBlotSpec;
|
|
19692
|
-
}
|
|
19684
|
+
UnclickableBlotSpec$1.default = UnclickableBlotSpec;
|
|
19693
19685
|
|
|
19694
19686
|
var hasRequiredIframeVideoSpec;
|
|
19695
19687
|
|
|
@@ -19701,7 +19693,7 @@ function requireIframeVideoSpec () {
|
|
|
19701
19693
|
value: true
|
|
19702
19694
|
});
|
|
19703
19695
|
|
|
19704
|
-
var _UnclickableBlotSpec2 =
|
|
19696
|
+
var _UnclickableBlotSpec2 = UnclickableBlotSpec$1;
|
|
19705
19697
|
|
|
19706
19698
|
var _UnclickableBlotSpec3 = _interopRequireDefault(_UnclickableBlotSpec2);
|
|
19707
19699
|
|
|
@@ -19928,7 +19920,7 @@ function requireOptions () {
|
|
|
19928
19920
|
}
|
|
19929
19921
|
});
|
|
19930
19922
|
|
|
19931
|
-
var _UnclickableBlotSpec =
|
|
19923
|
+
var _UnclickableBlotSpec = UnclickableBlotSpec$1;
|
|
19932
19924
|
|
|
19933
19925
|
Object.defineProperty(exports, 'UnclickableBlotSpec', {
|
|
19934
19926
|
enumerable: true,
|
|
@@ -20057,15 +20049,8 @@ const QuillEditor = defineComponent({
|
|
|
20057
20049
|
toolbar.style.display = 'none';
|
|
20058
20050
|
}
|
|
20059
20051
|
const icons = Quill.import('ui/icons');
|
|
20060
|
-
icons['ocr'] =
|
|
20061
|
-
|
|
20062
|
-
<path d="M3 3h12v12H3z" fill="none" stroke="currentColor" stroke-width="1.5"/>
|
|
20063
|
-
<path d="M6 7h6M6 9h6M6 11h4" stroke="currentColor" stroke-width="1"/>
|
|
20064
|
-
</svg>
|
|
20065
|
-
`;
|
|
20066
|
-
icons['custom-button'] = `
|
|
20067
|
-
<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"><defs><clipPath id="master_svg0_6759_139354"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_6759_139354)"><g><path d="M15.423694,15.049834L15.424264,15.049264Q15.508656,14.964872,15.554328,14.85461Q15.6,14.744348,15.6,14.625Q15.6,14.565905,15.58847,14.507944Q15.576942,14.449986,15.554328,14.395388Q15.531713,14.340792,15.498882,14.291656Q15.466051,14.242521,15.424265,14.200735Q15.382479,14.158949,15.333343,14.126117Q15.284206,14.093286,15.229609,14.070671Q15.175013,14.048058,15.117053,14.036528Q15.059094,14.025,15,14.025Q14.880652,14.025,14.77039,14.070672Q14.660128,14.116344,14.575736,14.200736L13.626472,15.150001L4.4485275,15.150001L10.174264,9.424264Q10.2160501,9.3824773,10.2488813,9.3333416Q10.281712500000001,9.2842059,10.304327,9.229609499999999Q10.3269415,9.175012599999999,10.3384705,9.117054Q10.349999,9.0590944,10.349999,8.999999500000001Q10.349999,8.9409046,10.3384705,8.8829451Q10.3269415,8.8249855,10.304327,8.7703896Q10.281712500000001,8.715793099999999,10.2488813,8.6666574Q10.2160501,8.6175222,10.174264,8.575736L4.4485282,2.85000002L13.626472,2.85000002L14.575395,3.7989223L14.575736,3.7992642Q14.660127,3.8836554999999997,14.77039,3.9293277Q14.880651,3.9749999000000003,15,3.975Q15.059094,3.9749999000000003,15.117054,3.9634712Q15.175013,3.9519422,15.229609,3.9293275999999997Q15.284206,3.906713,15.333342,3.8738817Q15.382478,3.8410504000000003,15.424264,3.7992641000000003Q15.466051,3.7574776,15.498882,3.7083421000000003Q15.531713,3.6592064,15.554328,3.60461Q15.576942,3.5500134,15.588472,3.4920541Q15.6,3.4340948,15.6,3.375Q15.6,3.2556524,15.554328,3.1453898000000002Q15.508656,3.03512704,15.424264,2.9507357499999998L15.423856,2.9503274L14.299264,1.82573593Q14.214872,1.7413445699999999,14.10461,1.69567227Q13.994347,1.64999998,13.875,1.64999998L3,1.64999998Q2.88065257,1.64999998,2.77038994,1.69567227Q2.66012731,1.7413445699999999,2.57573593,1.82573593Q2.53394958,1.8675223,2.50111824,1.91665789Q2.46828693,1.96579346,2.44567233,2.02038996Q2.42305773,2.07498647,2.41152894,2.13294582Q2.4000000999999997,2.190905161,2.40000004,2.25Q2.4000000999999997,2.309094839,2.41152889,2.36705418Q2.42305773,2.42501353,2.44567233,2.47961004Q2.46828693,2.53420654,2.50111827,2.58334213Q2.53394958,2.6324777,2.57573593,2.67426407L8.9014721,9L2.57573593,15.325736Q2.49134457,15.410126,2.44567227,15.520389Q2.39999998,15.630651,2.39999998,15.75Q2.39999998,15.809094,2.41152883,15.867053Q2.42305768,15.925013,2.44567233,15.979609Q2.46828693,16.034204000000003,2.50111827,16.08334Q2.53394958,16.132476,2.57573593,16.174263Q2.6175223,16.216048999999998,2.66665787,16.24888Q2.71579343,16.281712,2.77038994,16.304327Q2.82498646,16.326940999999998,2.88294581,16.33847Q2.940905157,16.349998,3,16.349999L13.875,16.349999Q13.994347,16.349998,14.104609,16.304326Q14.214872,16.258654,14.299264,16.174264L15.423694,15.049834Z" fill-rule="evenodd" fill="#333333" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>
|
|
20068
|
-
`;
|
|
20052
|
+
icons['ocr'] = `<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="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="#333333" fill-opacity="1"/></g></g></svg>`;
|
|
20053
|
+
icons['math'] = `<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"><defs><clipPath id="master_svg0_6759_139354"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_6759_139354)"><g><path d="M15.423694,15.049834L15.424264,15.049264Q15.508656,14.964872,15.554328,14.85461Q15.6,14.744348,15.6,14.625Q15.6,14.565905,15.58847,14.507944Q15.576942,14.449986,15.554328,14.395388Q15.531713,14.340792,15.498882,14.291656Q15.466051,14.242521,15.424265,14.200735Q15.382479,14.158949,15.333343,14.126117Q15.284206,14.093286,15.229609,14.070671Q15.175013,14.048058,15.117053,14.036528Q15.059094,14.025,15,14.025Q14.880652,14.025,14.77039,14.070672Q14.660128,14.116344,14.575736,14.200736L13.626472,15.150001L4.4485275,15.150001L10.174264,9.424264Q10.2160501,9.3824773,10.2488813,9.3333416Q10.281712500000001,9.2842059,10.304327,9.229609499999999Q10.3269415,9.175012599999999,10.3384705,9.117054Q10.349999,9.0590944,10.349999,8.999999500000001Q10.349999,8.9409046,10.3384705,8.8829451Q10.3269415,8.8249855,10.304327,8.7703896Q10.281712500000001,8.715793099999999,10.2488813,8.6666574Q10.2160501,8.6175222,10.174264,8.575736L4.4485282,2.85000002L13.626472,2.85000002L14.575395,3.7989223L14.575736,3.7992642Q14.660127,3.8836554999999997,14.77039,3.9293277Q14.880651,3.9749999000000003,15,3.975Q15.059094,3.9749999000000003,15.117054,3.9634712Q15.175013,3.9519422,15.229609,3.9293275999999997Q15.284206,3.906713,15.333342,3.8738817Q15.382478,3.8410504000000003,15.424264,3.7992641000000003Q15.466051,3.7574776,15.498882,3.7083421000000003Q15.531713,3.6592064,15.554328,3.60461Q15.576942,3.5500134,15.588472,3.4920541Q15.6,3.4340948,15.6,3.375Q15.6,3.2556524,15.554328,3.1453898000000002Q15.508656,3.03512704,15.424264,2.9507357499999998L15.423856,2.9503274L14.299264,1.82573593Q14.214872,1.7413445699999999,14.10461,1.69567227Q13.994347,1.64999998,13.875,1.64999998L3,1.64999998Q2.88065257,1.64999998,2.77038994,1.69567227Q2.66012731,1.7413445699999999,2.57573593,1.82573593Q2.53394958,1.8675223,2.50111824,1.91665789Q2.46828693,1.96579346,2.44567233,2.02038996Q2.42305773,2.07498647,2.41152894,2.13294582Q2.4000000999999997,2.190905161,2.40000004,2.25Q2.4000000999999997,2.309094839,2.41152889,2.36705418Q2.42305773,2.42501353,2.44567233,2.47961004Q2.46828693,2.53420654,2.50111827,2.58334213Q2.53394958,2.6324777,2.57573593,2.67426407L8.9014721,9L2.57573593,15.325736Q2.49134457,15.410126,2.44567227,15.520389Q2.39999998,15.630651,2.39999998,15.75Q2.39999998,15.809094,2.41152883,15.867053Q2.42305768,15.925013,2.44567233,15.979609Q2.46828693,16.034204000000003,2.50111827,16.08334Q2.53394958,16.132476,2.57573593,16.174263Q2.6175223,16.216048999999998,2.66665787,16.24888Q2.71579343,16.281712,2.77038994,16.304327Q2.82498646,16.326940999999998,2.88294581,16.33847Q2.940905157,16.349998,3,16.349999L13.875,16.349999Q13.994347,16.349998,14.104609,16.304326Q14.214872,16.258654,14.299264,16.174264L15.423694,15.049834Z" fill-rule="evenodd" fill="#333333" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>`;
|
|
20069
20054
|
options = composeOptions();
|
|
20070
20055
|
// Register modules
|
|
20071
20056
|
if (props.modules) {
|
|
@@ -20114,7 +20099,7 @@ const QuillEditor = defineComponent({
|
|
|
20114
20099
|
container: [
|
|
20115
20100
|
...toolbarOptions.full,
|
|
20116
20101
|
['ocr'],
|
|
20117
|
-
[{ '
|
|
20102
|
+
[{ 'math': true }], // 自定义按钮
|
|
20118
20103
|
],
|
|
20119
20104
|
handlers: {
|
|
20120
20105
|
ocr: function () {
|