@vueup/vue-quill 1.5.0 → 1.5.2
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 +67 -28
- package/dist/vue-quill.cjs.prod.js +3 -3
- package/dist/vue-quill.d.ts +7 -2
- package/dist/vue-quill.esm-browser.js +70 -31
- package/dist/vue-quill.esm-browser.prod.js +3 -3
- package/dist/vue-quill.esm-bundler.js +67 -28
- package/dist/vue-quill.esm-bundler.prod.js +3 -3
- package/dist/vue-quill.global.js +70 -31
- package/dist/vue-quill.global.prod.js +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* VueQuill @vueup/vue-quill v1.5.
|
|
2
|
+
* VueQuill @vueup/vue-quill v1.5.2
|
|
3
3
|
* https://vueup.github.io/vue-quill/
|
|
4
4
|
*
|
|
5
5
|
* Includes quill v2.0.2 || >=2.0.4 <3
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2026 Ahmad Luthfi Masruri
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2026-06-
|
|
10
|
+
* Date: 2026-06-02T23:50:41.596Z
|
|
11
11
|
*/
|
|
12
12
|
import Delta from 'quill-delta';
|
|
13
13
|
export { default as Delta } from 'quill-delta';
|
|
@@ -96,6 +96,55 @@ const Quill = new Proxy(function QuillProxy() { }, {
|
|
|
96
96
|
},
|
|
97
97
|
});
|
|
98
98
|
|
|
99
|
+
const quillRegistrationPathPrefixes = new Set([
|
|
100
|
+
'attributors',
|
|
101
|
+
'blots',
|
|
102
|
+
'formats',
|
|
103
|
+
'modules',
|
|
104
|
+
'themes',
|
|
105
|
+
'ui',
|
|
106
|
+
]);
|
|
107
|
+
const isQuillRegistrationPath = (name) => {
|
|
108
|
+
const [prefix] = name.split('/');
|
|
109
|
+
return quillRegistrationPathPrefixes.has(prefix);
|
|
110
|
+
};
|
|
111
|
+
const getModuleRegistrationName = (name) => {
|
|
112
|
+
return isQuillRegistrationPath(name) ? name : `modules/${name}`;
|
|
113
|
+
};
|
|
114
|
+
const getModuleOptionName = (name) => {
|
|
115
|
+
const registrationName = getModuleRegistrationName(name);
|
|
116
|
+
const modulePrefix = 'modules/';
|
|
117
|
+
return registrationName.startsWith(modulePrefix)
|
|
118
|
+
? registrationName.slice(modulePrefix.length)
|
|
119
|
+
: undefined;
|
|
120
|
+
};
|
|
121
|
+
const globalRegistryPathPrefixes = new Set(['attributors', 'blots', 'formats']);
|
|
122
|
+
const usesParchmentRegistry = (name) => {
|
|
123
|
+
const [prefix] = name.split('/');
|
|
124
|
+
return globalRegistryPathPrefixes.has(prefix);
|
|
125
|
+
};
|
|
126
|
+
const getModuleOptions = (modules) => {
|
|
127
|
+
var _a;
|
|
128
|
+
const modulesOption = {};
|
|
129
|
+
const registrations = Array.isArray(modules) ? modules : [modules];
|
|
130
|
+
for (const module of registrations) {
|
|
131
|
+
const optionName = getModuleOptionName(module.name);
|
|
132
|
+
if (optionName)
|
|
133
|
+
modulesOption[optionName] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
|
|
134
|
+
}
|
|
135
|
+
return Object.keys(modulesOption).length > 0 ? modulesOption : undefined;
|
|
136
|
+
};
|
|
137
|
+
const registerModule = (Quill, module, registry) => {
|
|
138
|
+
const moduleName = getModuleRegistrationName(module.name);
|
|
139
|
+
const quillImports = Quill.imports;
|
|
140
|
+
if (!quillImports || !(moduleName in quillImports)) {
|
|
141
|
+
Quill.register(moduleName, module.module);
|
|
142
|
+
}
|
|
143
|
+
if (registry && usesParchmentRegistry(moduleName)) {
|
|
144
|
+
registry.register(module.module);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
99
148
|
const QuillEditor = defineComponent({
|
|
100
149
|
name: 'QuillEditor',
|
|
101
150
|
inheritAttrs: false,
|
|
@@ -130,9 +179,12 @@ const QuillEditor = defineComponent({
|
|
|
130
179
|
},
|
|
131
180
|
},
|
|
132
181
|
toolbar: {
|
|
133
|
-
type: [String, Array, Object],
|
|
182
|
+
type: [String, Array, Object, Boolean],
|
|
134
183
|
required: false,
|
|
184
|
+
default: undefined,
|
|
135
185
|
validator: (value) => {
|
|
186
|
+
if (typeof value === 'boolean')
|
|
187
|
+
return value === false;
|
|
136
188
|
if (typeof value === 'string' && value !== '') {
|
|
137
189
|
return value.charAt(0) === '#'
|
|
138
190
|
? true
|
|
@@ -176,14 +228,6 @@ const QuillEditor = defineComponent({
|
|
|
176
228
|
let quill;
|
|
177
229
|
let options;
|
|
178
230
|
const editor = ref();
|
|
179
|
-
// Register Module if not already registered
|
|
180
|
-
const registerModule = (Quill, moduleName, module) => {
|
|
181
|
-
const quillImports = Quill.imports;
|
|
182
|
-
if (quillImports && moduleName in quillImports) {
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
Quill.register(moduleName, module);
|
|
186
|
-
};
|
|
187
231
|
// Initialize Quill
|
|
188
232
|
const initialize = async () => {
|
|
189
233
|
var _a, _b;
|
|
@@ -198,11 +242,11 @@ const QuillEditor = defineComponent({
|
|
|
198
242
|
if (props.modules) {
|
|
199
243
|
if (Array.isArray(props.modules)) {
|
|
200
244
|
for (const module of props.modules) {
|
|
201
|
-
registerModule(Quill,
|
|
245
|
+
registerModule(Quill, module, options.registry);
|
|
202
246
|
}
|
|
203
247
|
}
|
|
204
248
|
else {
|
|
205
|
-
registerModule(Quill,
|
|
249
|
+
registerModule(Quill, props.modules, options.registry);
|
|
206
250
|
}
|
|
207
251
|
}
|
|
208
252
|
// Create new Quill instance
|
|
@@ -234,7 +278,12 @@ const QuillEditor = defineComponent({
|
|
|
234
278
|
clientOptions.readOnly = props.readOnly;
|
|
235
279
|
if (props.placeholder)
|
|
236
280
|
clientOptions.placeholder = props.placeholder;
|
|
237
|
-
if (props.toolbar
|
|
281
|
+
if (props.toolbar === false) {
|
|
282
|
+
clientOptions.modules = {
|
|
283
|
+
toolbar: false,
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
else if (props.toolbar && props.toolbar !== '') {
|
|
238
287
|
clientOptions.modules = {
|
|
239
288
|
toolbar: (() => {
|
|
240
289
|
if (typeof props.toolbar === 'object') {
|
|
@@ -251,20 +300,10 @@ const QuillEditor = defineComponent({
|
|
|
251
300
|
};
|
|
252
301
|
}
|
|
253
302
|
if (props.modules) {
|
|
254
|
-
const modules = (
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
for (const module of props.modules) {
|
|
259
|
-
modulesOption[module.name] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
else {
|
|
263
|
-
modulesOption[props.modules.name] = (_b = props.modules.options) !== null && _b !== void 0 ? _b : {};
|
|
264
|
-
}
|
|
265
|
-
return modulesOption;
|
|
266
|
-
})();
|
|
267
|
-
clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
|
|
303
|
+
const modules = getModuleOptions(props.modules);
|
|
304
|
+
if (modules) {
|
|
305
|
+
clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
|
|
306
|
+
}
|
|
268
307
|
}
|
|
269
308
|
return Object.assign({}, props.globalOptions, props.options, clientOptions);
|
|
270
309
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* VueQuill @vueup/vue-quill v1.5.
|
|
2
|
+
* VueQuill @vueup/vue-quill v1.5.2
|
|
3
3
|
* https://vueup.github.io/vue-quill/
|
|
4
4
|
*
|
|
5
5
|
* Includes quill v2.0.2 || >=2.0.4 <3
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2026 Ahmad Luthfi Masruri
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2026-06-
|
|
10
|
+
* Date: 2026-06-02T23:50:41.596Z
|
|
11
11
|
*/
|
|
12
|
-
import e from"quill-delta";export{default as Delta}from"quill-delta";import{defineComponent as t,h as o,onMounted as n,onBeforeUnmount as l,ref as r,watch as i,nextTick as a}from"vue";const s={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]};let u,d,c=[];const
|
|
12
|
+
import e from"quill-delta";export{default as Delta}from"quill-delta";import{defineComponent as t,h as o,onMounted as n,onBeforeUnmount as l,ref as r,watch as i,nextTick as a}from"vue";const s={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]};let u,d,c=[];const b=()=>"undefined"!=typeof document,m=async()=>{if(u)return u;if(!b())throw new Error("@vueup/vue-quill: Quill can only be loaded in a browser environment.");return null!=d||(d=import("quill").then(({default:e})=>(u=e,(e=>{const t=c;c=[];for(const o of t)e.register(...o)})(e),e))),d},p=()=>u,f=()=>{if(u)return u;throw new Error("@vueup/vue-quill: Quill is not loaded yet. Use loadQuill() in a browser-only lifecycle hook, or access the Quill instance from the ready event.")},v=new Proxy(function(){},{get(e,t){if("register"===t)return(...e)=>{if(u)return u.register(...e);c.push(e),b()&&m()};const o=f(),n=o[t];return"function"==typeof n?n.bind(o):n},construct:(e,t)=>new(f())(...t)}),h=new Set(["attributors","blots","formats","modules","themes","ui"]),y=e=>(e=>{const[t]=e.split("/");return h.has(t)})(e)?e:`modules/${e}`,g=e=>{const t=y(e),o="modules/";return t.startsWith(o)?t.slice(8):void 0},w=new Set(["attributors","blots","formats"]),O=(e,t,o)=>{const n=y(t.name),l=e.imports;l&&n in l||e.register(n,t.module),o&&(e=>{const[t]=e.split("/");return w.has(t)})(n)&&o.register(t.module)},T=t({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,default:void 0,validator:e=>"boolean"==typeof e?!1===e:"string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(s).indexOf(e))},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(t,o)=>{n(()=>{c=!1,p()}),l(()=>{u=null,c=!0});let u,d,c=!1;const b=r(),p=async()=>{var e,n;if(!b.value)return;const l=b.value,r=await m();if(!c&&b.value&&b.value===l){if(d=f(),t.modules)if(Array.isArray(t.modules))for(const e of t.modules)O(r,e,d.registry);else O(r,t.modules,d.registry);u=new r(b.value,d),k(t.content),u.on("text-change",T),u.on("selection-change",j),u.on("editor-change",x),"bubble"!==t.theme&&b.value.classList.remove("ql-bubble"),"snow"!==t.theme&&b.value.classList.remove("ql-snow"),null===(n=null===(e=h())||void 0===e?void 0:e.container)||void 0===n||n.addEventListener("mousedown",e=>{e.preventDefault()}),o.emit("ready",u)}},f=()=>{const e={};if(""!==t.theme&&(e.theme=t.theme),t.readOnly&&(e.readOnly=t.readOnly),t.placeholder&&(e.placeholder=t.placeholder),!1===t.toolbar?e.modules={toolbar:!1}:t.toolbar&&""!==t.toolbar&&(e.modules={toolbar:(()=>{if("object"==typeof t.toolbar)return t.toolbar;if("string"==typeof t.toolbar){return"#"===t.toolbar.charAt(0)?t.toolbar:s[t.toolbar]}})()}),t.modules){const o=(e=>{var t;const o={},n=Array.isArray(e)?e:[e];for(const l of n){const e=g(l.name);e&&(o[e]=null!==(t=l.options)&&void 0!==t?t:{})}return Object.keys(o).length>0?o:void 0})(t.modules);o&&(e.modules=Object.assign({},e.modules,o))}return Object.assign({},t.globalOptions,t.options,e)},v=e=>"object"==typeof e&&e?e.slice():e,h=()=>null==u?void 0:u.getModule("toolbar");let y;const w=e=>{if(typeof y==typeof e){if(e===y)return!0;if("object"==typeof e&&e&&"object"==typeof y&&y)return t=y.diff(e),!Object.values(t.ops).some(e=>!e.retain||1!==Object.keys(e).length)}var t;return!1},T=(e,n,l)=>{y=v(C()),w(t.content)||o.emit("update:content",y),o.emit("textChange",{delta:e,oldContents:n,source:l})},q=r(),j=(e,t,n)=>{q.value=!!(null==u?void 0:u.hasFocus()),o.emit("selectionChange",{range:e,oldRange:t,source:n})};i(q,e=>{o.emit(e?"focus":"blur",b)});const x=(...e)=>{"text-change"===e[0]&&o.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&o.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},C=(e,o)=>"html"===t.contentType?L():"text"===t.contentType?S(e,o):null==u?void 0:u.getContents(e,o),k=(o,n="api")=>{const l=o||("delta"===t.contentType?new e:"");"html"===t.contentType?M(l):"text"===t.contentType?A(l,n):null==u||u.setContents(l,n),y=v(l)},S=(e,t)=>{var o;return null!==(o=null==u?void 0:u.getText(e,t))&&void 0!==o?o:""},A=(e,t="api")=>{null==u||u.setText(e,t)},L=()=>{var e;return null!==(e=null==u?void 0:u.root.innerHTML)&&void 0!==e?e:""},M=e=>{u&&(u.root.innerHTML=e)};return i(()=>t.content,e=>{if(!u||!e||w(e))return;const t=u.getSelection();t&&a(()=>null==u?void 0:u.setSelection(t)),k(e)},{deep:!0}),i(()=>t.enable,e=>{u&&u.enable(e)}),{editor:b,getEditor:()=>b.value,getToolbar:()=>{var e;return null===(e=h())||void 0===e?void 0:e.container},getQuill:()=>{if(u)return u;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:C,setContents:k,getHTML:L,setHTML:M,pasteHTML:(e,t="api")=>{const o=null==u?void 0:u.clipboard.convert({html:e});o&&(null==u||u.setContents(o,t))},focus:()=>{null==u||u.focus()},getText:S,setText:A,reinit:()=>{a(()=>{var e,t;!o.slots.toolbar&&u&&(null===(t=null===(e=h())||void 0===e?void 0:e.container)||void 0===t||t.remove()),p()})}}},render(){var e,t;return[null===(t=(e=this.$slots).toolbar)||void 0===t?void 0:t.call(e),o("div",{ref:"editor",...this.$attrs})]}});export{v as Quill,T as QuillEditor,p as getLoadedQuill,m as loadQuill};
|
package/dist/vue-quill.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* VueQuill @vueup/vue-quill v1.5.
|
|
2
|
+
* VueQuill @vueup/vue-quill v1.5.2
|
|
3
3
|
* https://vueup.github.io/vue-quill/
|
|
4
4
|
*
|
|
5
5
|
* Includes quill v2.0.2 || >=2.0.4 <3
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Copyright (c) 2026 Ahmad Luthfi Masruri
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date: 2026-06-
|
|
10
|
+
* Date: 2026-06-02T23:50:41.596Z
|
|
11
11
|
*/
|
|
12
12
|
(function (global, factory) {
|
|
13
13
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
@@ -5600,6 +5600,55 @@
|
|
|
5600
5600
|
},
|
|
5601
5601
|
});
|
|
5602
5602
|
|
|
5603
|
+
const quillRegistrationPathPrefixes = new Set([
|
|
5604
|
+
'attributors',
|
|
5605
|
+
'blots',
|
|
5606
|
+
'formats',
|
|
5607
|
+
'modules',
|
|
5608
|
+
'themes',
|
|
5609
|
+
'ui',
|
|
5610
|
+
]);
|
|
5611
|
+
const isQuillRegistrationPath = (name) => {
|
|
5612
|
+
const [prefix] = name.split('/');
|
|
5613
|
+
return quillRegistrationPathPrefixes.has(prefix);
|
|
5614
|
+
};
|
|
5615
|
+
const getModuleRegistrationName = (name) => {
|
|
5616
|
+
return isQuillRegistrationPath(name) ? name : `modules/${name}`;
|
|
5617
|
+
};
|
|
5618
|
+
const getModuleOptionName = (name) => {
|
|
5619
|
+
const registrationName = getModuleRegistrationName(name);
|
|
5620
|
+
const modulePrefix = 'modules/';
|
|
5621
|
+
return registrationName.startsWith(modulePrefix)
|
|
5622
|
+
? registrationName.slice(modulePrefix.length)
|
|
5623
|
+
: undefined;
|
|
5624
|
+
};
|
|
5625
|
+
const globalRegistryPathPrefixes = new Set(['attributors', 'blots', 'formats']);
|
|
5626
|
+
const usesParchmentRegistry = (name) => {
|
|
5627
|
+
const [prefix] = name.split('/');
|
|
5628
|
+
return globalRegistryPathPrefixes.has(prefix);
|
|
5629
|
+
};
|
|
5630
|
+
const getModuleOptions = (modules) => {
|
|
5631
|
+
var _a;
|
|
5632
|
+
const modulesOption = {};
|
|
5633
|
+
const registrations = Array.isArray(modules) ? modules : [modules];
|
|
5634
|
+
for (const module of registrations) {
|
|
5635
|
+
const optionName = getModuleOptionName(module.name);
|
|
5636
|
+
if (optionName)
|
|
5637
|
+
modulesOption[optionName] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
|
|
5638
|
+
}
|
|
5639
|
+
return Object.keys(modulesOption).length > 0 ? modulesOption : undefined;
|
|
5640
|
+
};
|
|
5641
|
+
const registerModule = (Quill, module, registry) => {
|
|
5642
|
+
const moduleName = getModuleRegistrationName(module.name);
|
|
5643
|
+
const quillImports = Quill.imports;
|
|
5644
|
+
if (!quillImports || !(moduleName in quillImports)) {
|
|
5645
|
+
Quill.register(moduleName, module.module);
|
|
5646
|
+
}
|
|
5647
|
+
if (registry && usesParchmentRegistry(moduleName)) {
|
|
5648
|
+
registry.register(module.module);
|
|
5649
|
+
}
|
|
5650
|
+
};
|
|
5651
|
+
|
|
5603
5652
|
const QuillEditor = vue.defineComponent({
|
|
5604
5653
|
name: 'QuillEditor',
|
|
5605
5654
|
inheritAttrs: false,
|
|
@@ -5634,9 +5683,12 @@
|
|
|
5634
5683
|
},
|
|
5635
5684
|
},
|
|
5636
5685
|
toolbar: {
|
|
5637
|
-
type: [String, Array, Object],
|
|
5686
|
+
type: [String, Array, Object, Boolean],
|
|
5638
5687
|
required: false,
|
|
5688
|
+
default: undefined,
|
|
5639
5689
|
validator: (value) => {
|
|
5690
|
+
if (typeof value === 'boolean')
|
|
5691
|
+
return value === false;
|
|
5640
5692
|
if (typeof value === 'string' && value !== '') {
|
|
5641
5693
|
return value.charAt(0) === '#'
|
|
5642
5694
|
? true
|
|
@@ -5680,14 +5732,6 @@
|
|
|
5680
5732
|
let quill;
|
|
5681
5733
|
let options;
|
|
5682
5734
|
const editor = vue.ref();
|
|
5683
|
-
// Register Module if not already registered
|
|
5684
|
-
const registerModule = (Quill, moduleName, module) => {
|
|
5685
|
-
const quillImports = Quill.imports;
|
|
5686
|
-
if (quillImports && moduleName in quillImports) {
|
|
5687
|
-
return;
|
|
5688
|
-
}
|
|
5689
|
-
Quill.register(moduleName, module);
|
|
5690
|
-
};
|
|
5691
5735
|
// Initialize Quill
|
|
5692
5736
|
const initialize = async () => {
|
|
5693
5737
|
var _a, _b;
|
|
@@ -5702,11 +5746,11 @@
|
|
|
5702
5746
|
if (props.modules) {
|
|
5703
5747
|
if (Array.isArray(props.modules)) {
|
|
5704
5748
|
for (const module of props.modules) {
|
|
5705
|
-
registerModule(Quill,
|
|
5749
|
+
registerModule(Quill, module, options.registry);
|
|
5706
5750
|
}
|
|
5707
5751
|
}
|
|
5708
5752
|
else {
|
|
5709
|
-
registerModule(Quill,
|
|
5753
|
+
registerModule(Quill, props.modules, options.registry);
|
|
5710
5754
|
}
|
|
5711
5755
|
}
|
|
5712
5756
|
// Create new Quill instance
|
|
@@ -5738,7 +5782,12 @@
|
|
|
5738
5782
|
clientOptions.readOnly = props.readOnly;
|
|
5739
5783
|
if (props.placeholder)
|
|
5740
5784
|
clientOptions.placeholder = props.placeholder;
|
|
5741
|
-
if (props.toolbar
|
|
5785
|
+
if (props.toolbar === false) {
|
|
5786
|
+
clientOptions.modules = {
|
|
5787
|
+
toolbar: false,
|
|
5788
|
+
};
|
|
5789
|
+
}
|
|
5790
|
+
else if (props.toolbar && props.toolbar !== '') {
|
|
5742
5791
|
clientOptions.modules = {
|
|
5743
5792
|
toolbar: (() => {
|
|
5744
5793
|
if (typeof props.toolbar === 'object') {
|
|
@@ -5755,20 +5804,10 @@
|
|
|
5755
5804
|
};
|
|
5756
5805
|
}
|
|
5757
5806
|
if (props.modules) {
|
|
5758
|
-
const modules = (
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
for (const module of props.modules) {
|
|
5763
|
-
modulesOption[module.name] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
|
|
5764
|
-
}
|
|
5765
|
-
}
|
|
5766
|
-
else {
|
|
5767
|
-
modulesOption[props.modules.name] = (_b = props.modules.options) !== null && _b !== void 0 ? _b : {};
|
|
5768
|
-
}
|
|
5769
|
-
return modulesOption;
|
|
5770
|
-
})();
|
|
5771
|
-
clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
|
|
5807
|
+
const modules = getModuleOptions(props.modules);
|
|
5808
|
+
if (modules) {
|
|
5809
|
+
clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
|
|
5810
|
+
}
|
|
5772
5811
|
}
|
|
5773
5812
|
return Object.assign({}, props.globalOptions, props.options, clientOptions);
|
|
5774
5813
|
};
|
|
@@ -7940,7 +7979,7 @@
|
|
|
7940
7979
|
var Promise$1 = getNative(root, 'Promise');
|
|
7941
7980
|
|
|
7942
7981
|
/* Built-in method references that are verified to be native. */
|
|
7943
|
-
var Set = getNative(root, 'Set');
|
|
7982
|
+
var Set$1 = getNative(root, 'Set');
|
|
7944
7983
|
|
|
7945
7984
|
/** `Object#toString` result references. */
|
|
7946
7985
|
var mapTag$4 = '[object Map]',
|
|
@@ -7955,7 +7994,7 @@
|
|
|
7955
7994
|
var dataViewCtorString = toSource(DataView),
|
|
7956
7995
|
mapCtorString = toSource(Map),
|
|
7957
7996
|
promiseCtorString = toSource(Promise$1),
|
|
7958
|
-
setCtorString = toSource(Set),
|
|
7997
|
+
setCtorString = toSource(Set$1),
|
|
7959
7998
|
weakMapCtorString = toSource(WeakMap$1);
|
|
7960
7999
|
|
|
7961
8000
|
/**
|
|
@@ -7971,7 +8010,7 @@
|
|
|
7971
8010
|
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3) ||
|
|
7972
8011
|
(Map && getTag(new Map) != mapTag$4) ||
|
|
7973
8012
|
(Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
|
|
7974
|
-
(Set && getTag(new Set) != setTag$4) ||
|
|
8013
|
+
(Set$1 && getTag(new Set$1) != setTag$4) ||
|
|
7975
8014
|
(WeakMap$1 && getTag(new WeakMap$1) != weakMapTag$1)) {
|
|
7976
8015
|
getTag = function(value) {
|
|
7977
8016
|
var result = baseGetTag(value),
|