@vueup/vue-quill 1.5.1 → 1.5.3

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/README.md CHANGED
@@ -0,0 +1,75 @@
1
+ <p align="center">
2
+ <a href="https://vueup.github.io/vue-quill/" target="_blank" rel="noopener noreferrer">
3
+ <img height="120" src="https://vueup.github.io/vue-quill/quill.svg" alt="Vue + Quill logo">
4
+ </a>
5
+ </p>
6
+ <h1 align="center">VueQuill</h1>
7
+ <h3 align="center">
8
+ Rich Text Editor Component for Vue 3.
9
+ </h3>
10
+ <p align="center">
11
+ <a href="https://www.npmjs.com/package/@vueup/vue-quill" title="Version" target="_blank" rel="noopener noreferrer">
12
+ <img alt="npm (tag)" src="https://img.shields.io/npm/v/@vueup/vue-quill">
13
+ </a>
14
+ <a href="https://www.npmjs.com/package/@vueup/vue-quill" title="License" target="_blank" rel="noopener noreferrer">
15
+ <img src="https://img.shields.io/npm/l/@vueup/vue-quill" alt="License">
16
+ </a>
17
+ <a href="https://github.com/vueup/vue-quill/actions" title="Checks" target="_blank" rel="noopener noreferrer">
18
+ <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/vueup/vue-quill/release-vue-quill.yml?branch=master&logo=github">
19
+ </a>
20
+ <a href="https://github.com/vueup/vue-quill" title="Last commit" target="_blank" rel="noopener noreferrer">
21
+ <img src="https://img.shields.io/github/last-commit/vueup/vue-quill?logo=github" alt="Last commit">
22
+ </a>
23
+ <a href="https://github.com/vueup/vue-quill" title="Github Repo Stars" target="_blank" rel="noopener noreferrer">
24
+ <img src="https://img.shields.io/github/stars/vueup/vue-quill?style=social" alt="Github Repo Stars">
25
+ </a>
26
+ </p>
27
+ <p align="center">
28
+ <a href="https://vueup.github.io/vue-quill/#demo" title="VueQuill Demo" target="_blank" rel="noopener noreferrer">
29
+ <img src="https://user-images.githubusercontent.com/6185447/111898684-33761b00-8a5a-11eb-9458-372c0185f576.png" alt="VueQuill Editor">
30
+ </a>
31
+ <br>
32
+ <a href="https://vueup.github.io/vue-quill/#demo" title="Live Demo" target="_blank" rel="noopener noreferrer">👀 See a Live Demo</a>
33
+ </p>
34
+
35
+ ## 🔎 Overview
36
+
37
+ **VueQuill** is a **Component** for building rich text editors, powered by Vue 3 and Quill.
38
+
39
+ - 💚 **Built With Vue 3:** More powerful and performant framework than ever before.
40
+ - 🧙‍♂️ **Fully Typescript:** VueQuill source code is written entirely in TypeScript.
41
+ - 🛠️ **Easy To Use:** Straightforward implementation through a simple API.
42
+
43
+ ## 📚 Documentation
44
+
45
+ - **[📘 Guide](https://vueup.github.io/vue-quill/guide/)**
46
+ - [🚀 Introduction](https://vueup.github.io/vue-quill/guide/)
47
+ - [⚙️ Installation](https://vueup.github.io/vue-quill/guide/installation.html)
48
+ - [💡 Usage](https://vueup.github.io/vue-quill/guide/usage.html)
49
+ - [🎨 Themes](https://vueup.github.io/vue-quill/guide/themes.html)
50
+ - [🚥 Toolbar](https://vueup.github.io/vue-quill/guide/toolbar.html)
51
+ - [📦 Modules](https://vueup.github.io/vue-quill/guide/modules.html)
52
+ - [🛠️ Options](https://vueup.github.io/vue-quill/guide/options.html)
53
+ - [🖥️ Server-Side Rendering](https://vueup.github.io/vue-quill/guide/ssr.html)
54
+ - **[🧰 APIs](https://vueup.github.io/vue-quill/api/)**
55
+ - [📌 Props](https://vueup.github.io/vue-quill/api/)
56
+ - [⚡ Events](https://vueup.github.io/vue-quill/api/events.html)
57
+ - [📢 Methods](https://vueup.github.io/vue-quill/api/methods.html)
58
+ - [🔌 Slots](https://vueup.github.io/vue-quill/api/slots.html)
59
+ - [↗️ Export](https://vueup.github.io/vue-quill/api/export.html)
60
+
61
+ ## ☑️ To do list
62
+
63
+ - [x] Release `alpha` version
64
+ - [x] Release `beta` version
65
+ - [x] Stable `v1.0.0` release
66
+ - [x] Enhance Typescript support with Vue 3
67
+ - [ ] Update the Documentation with more examples and more information
68
+
69
+ ## 👏 Contributing
70
+
71
+ Pull requests are welcome. For major changes, please create a [new discussion](https://github.com/vueup/vue-quill/discussions) first about what you would like to change.
72
+
73
+ ## 📝 License
74
+
75
+ [MIT](https://choosealicense.com/licenses/mit/)
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.5.1
2
+ * VueQuill @vueup/vue-quill v1.5.3
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-02T03:36:43.438Z
10
+ * Date: 2026-06-03T00:25:15.762Z
11
11
  */
12
12
  'use strict';
13
13
 
@@ -97,6 +97,55 @@ const Quill = new Proxy(function QuillProxy() { }, {
97
97
  },
98
98
  });
99
99
 
100
+ const quillRegistrationPathPrefixes = new Set([
101
+ 'attributors',
102
+ 'blots',
103
+ 'formats',
104
+ 'modules',
105
+ 'themes',
106
+ 'ui',
107
+ ]);
108
+ const isQuillRegistrationPath = (name) => {
109
+ const [prefix] = name.split('/');
110
+ return quillRegistrationPathPrefixes.has(prefix);
111
+ };
112
+ const getModuleRegistrationName = (name) => {
113
+ return isQuillRegistrationPath(name) ? name : `modules/${name}`;
114
+ };
115
+ const getModuleOptionName = (name) => {
116
+ const registrationName = getModuleRegistrationName(name);
117
+ const modulePrefix = 'modules/';
118
+ return registrationName.startsWith(modulePrefix)
119
+ ? registrationName.slice(modulePrefix.length)
120
+ : undefined;
121
+ };
122
+ const globalRegistryPathPrefixes = new Set(['attributors', 'blots', 'formats']);
123
+ const usesParchmentRegistry = (name) => {
124
+ const [prefix] = name.split('/');
125
+ return globalRegistryPathPrefixes.has(prefix);
126
+ };
127
+ const getModuleOptions = (modules) => {
128
+ var _a;
129
+ const modulesOption = {};
130
+ const registrations = Array.isArray(modules) ? modules : [modules];
131
+ for (const module of registrations) {
132
+ const optionName = getModuleOptionName(module.name);
133
+ if (optionName)
134
+ modulesOption[optionName] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
135
+ }
136
+ return Object.keys(modulesOption).length > 0 ? modulesOption : undefined;
137
+ };
138
+ const registerModule = (Quill, module, registry) => {
139
+ const moduleName = getModuleRegistrationName(module.name);
140
+ const quillImports = Quill.imports;
141
+ if (!quillImports || !(moduleName in quillImports)) {
142
+ Quill.register(moduleName, module.module);
143
+ }
144
+ if (registry && usesParchmentRegistry(moduleName)) {
145
+ registry.register(module.module);
146
+ }
147
+ };
148
+
100
149
  const QuillEditor = vue.defineComponent({
101
150
  name: 'QuillEditor',
102
151
  inheritAttrs: false,
@@ -180,14 +229,6 @@ const QuillEditor = vue.defineComponent({
180
229
  let quill;
181
230
  let options;
182
231
  const editor = vue.ref();
183
- // Register Module if not already registered
184
- const registerModule = (Quill, moduleName, module) => {
185
- const quillImports = Quill.imports;
186
- if (quillImports && moduleName in quillImports) {
187
- return;
188
- }
189
- Quill.register(moduleName, module);
190
- };
191
232
  // Initialize Quill
192
233
  const initialize = async () => {
193
234
  var _a, _b;
@@ -202,11 +243,11 @@ const QuillEditor = vue.defineComponent({
202
243
  if (props.modules) {
203
244
  if (Array.isArray(props.modules)) {
204
245
  for (const module of props.modules) {
205
- registerModule(Quill, `modules/${module.name}`, module.module);
246
+ registerModule(Quill, module, options.registry);
206
247
  }
207
248
  }
208
249
  else {
209
- registerModule(Quill, `modules/${props.modules.name}`, props.modules.module);
250
+ registerModule(Quill, props.modules, options.registry);
210
251
  }
211
252
  }
212
253
  // Create new Quill instance
@@ -260,20 +301,10 @@ const QuillEditor = vue.defineComponent({
260
301
  };
261
302
  }
262
303
  if (props.modules) {
263
- const modules = (() => {
264
- var _a, _b;
265
- const modulesOption = {};
266
- if (Array.isArray(props.modules)) {
267
- for (const module of props.modules) {
268
- modulesOption[module.name] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
269
- }
270
- }
271
- else {
272
- modulesOption[props.modules.name] = (_b = props.modules.options) !== null && _b !== void 0 ? _b : {};
273
- }
274
- return modulesOption;
275
- })();
276
- clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
304
+ const modules = getModuleOptions(props.modules);
305
+ if (modules) {
306
+ clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
307
+ }
277
308
  }
278
309
  return Object.assign({}, props.globalOptions, props.options, clientOptions);
279
310
  };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.5.1
2
+ * VueQuill @vueup/vue-quill v1.5.3
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-02T03:36:43.438Z
10
+ * Date: 2026-06-03T00:25:15.762Z
11
11
  */
12
- "use strict";var e=require("quill-delta"),t=require("vue");const o={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 n,l,r=[];const i=()=>"undefined"!=typeof document,a=async()=>{if(n)return n;if(!i())throw new Error("@vueup/vue-quill: Quill can only be loaded in a browser environment.");return null!=l||(l=import("quill").then(({default:e})=>(n=e,(e=>{const t=r;r=[];for(const o of t)e.register(...o)})(e),e))),l},s=()=>{if(n)return n;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.")},u=new Proxy(function(){},{get(e,t){if("register"===t)return(...e)=>{if(n)return n.register(...e);r.push(e),i()&&a()};const o=s(),l=o[t];return"function"==typeof l?l.bind(o):l},construct:(e,t)=>new(s())(...t)}),d=t.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,default:void 0,validator:e=>"boolean"==typeof e?!1===e:"string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(o).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:(n,l)=>{t.onMounted(()=>{s=!1,c()}),t.onBeforeUnmount(()=>{r=null,s=!0});let r,i,s=!1;const u=t.ref(),d=(e,t,o)=>{const n=e.imports;n&&t in n||e.register(t,o)},c=async()=>{var e,t;if(!u.value)return;const o=u.value,c=await a();if(!s&&u.value&&u.value===o){if(i=b(),n.modules)if(Array.isArray(n.modules))for(const e of n.modules)d(c,`modules/${e.name}`,e.module);else d(c,`modules/${n.modules.name}`,n.modules.module);r=new c(u.value,i),T(n.content),r.on("text-change",h),r.on("selection-change",g),r.on("editor-change",w),"bubble"!==n.theme&&u.value.classList.remove("ql-bubble"),"snow"!==n.theme&&u.value.classList.remove("ql-snow"),null===(t=null===(e=m())||void 0===e?void 0:e.container)||void 0===t||t.addEventListener("mousedown",e=>{e.preventDefault()}),l.emit("ready",r)}},b=()=>{const e={};if(""!==n.theme&&(e.theme=n.theme),n.readOnly&&(e.readOnly=n.readOnly),n.placeholder&&(e.placeholder=n.placeholder),!1===n.toolbar?e.modules={toolbar:!1}:n.toolbar&&""!==n.toolbar&&(e.modules={toolbar:(()=>{if("object"==typeof n.toolbar)return n.toolbar;if("string"==typeof n.toolbar){return"#"===n.toolbar.charAt(0)?n.toolbar:o[n.toolbar]}})()}),n.modules){const t=(()=>{var e,t;const o={};if(Array.isArray(n.modules))for(const l of n.modules)o[l.name]=null!==(e=l.options)&&void 0!==e?e:{};else o[n.modules.name]=null!==(t=n.modules.options)&&void 0!==t?t:{};return o})();e.modules=Object.assign({},e.modules,t)}return Object.assign({},n.globalOptions,n.options,e)},p=e=>"object"==typeof e&&e?e.slice():e,m=()=>null==r?void 0:r.getModule("toolbar");let f;const v=e=>{if(typeof f==typeof e){if(e===f)return!0;if("object"==typeof e&&e&&"object"==typeof f&&f)return t=f.diff(e),!Object.values(t.ops).some(e=>!e.retain||1!==Object.keys(e).length)}var t;return!1},h=(e,t,o)=>{f=p(x()),v(n.content)||l.emit("update:content",f),l.emit("textChange",{delta:e,oldContents:t,source:o})},y=t.ref(),g=(e,t,o)=>{y.value=!!(null==r?void 0:r.hasFocus()),l.emit("selectionChange",{range:e,oldRange:t,source:o})};t.watch(y,e=>{l.emit(e?"focus":"blur",u)});const w=(...e)=>{"text-change"===e[0]&&l.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&l.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},x=(e,t)=>"html"===n.contentType?C():"text"===n.contentType?q(e,t):null==r?void 0:r.getContents(e,t),T=(t,o="api")=>{const l=t||("delta"===n.contentType?new e:"");"html"===n.contentType?j(l):"text"===n.contentType?O(l,o):null==r||r.setContents(l,o),f=p(l)},q=(e,t)=>{var o;return null!==(o=null==r?void 0:r.getText(e,t))&&void 0!==o?o:""},O=(e,t="api")=>{null==r||r.setText(e,t)},C=()=>{var e;return null!==(e=null==r?void 0:r.root.innerHTML)&&void 0!==e?e:""},j=e=>{r&&(r.root.innerHTML=e)};return t.watch(()=>n.content,e=>{if(!r||!e||v(e))return;const o=r.getSelection();o&&t.nextTick(()=>null==r?void 0:r.setSelection(o)),T(e)},{deep:!0}),t.watch(()=>n.enable,e=>{r&&r.enable(e)}),{editor:u,getEditor:()=>u.value,getToolbar:()=>{var e;return null===(e=m())||void 0===e?void 0:e.container},getQuill:()=>{if(r)return r;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:x,setContents:T,getHTML:C,setHTML:j,pasteHTML:(e,t="api")=>{const o=null==r?void 0:r.clipboard.convert({html:e});o&&(null==r||r.setContents(o,t))},focus:()=>{null==r||r.focus()},getText:q,setText:O,reinit:()=>{t.nextTick(()=>{var e,t;!l.slots.toolbar&&r&&(null===(t=null===(e=m())||void 0===e?void 0:e.container)||void 0===t||t.remove()),c()})}}},render(){var e,o;return[null===(o=(e=this.$slots).toolbar)||void 0===o?void 0:o.call(e),t.h("div",{ref:"editor",...this.$attrs})]}});exports.Delta=e,exports.Quill=u,exports.QuillEditor=d,exports.getLoadedQuill=()=>n,exports.loadQuill=a;
12
+ "use strict";var e=require("quill-delta"),t=require("vue");const o={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 n,l,r=[];const i=()=>"undefined"!=typeof document,a=async()=>{if(n)return n;if(!i())throw new Error("@vueup/vue-quill: Quill can only be loaded in a browser environment.");return null!=l||(l=import("quill").then(({default:e})=>(n=e,(e=>{const t=r;r=[];for(const o of t)e.register(...o)})(e),e))),l},s=()=>{if(n)return n;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.")},u=new Proxy(function(){},{get(e,t){if("register"===t)return(...e)=>{if(n)return n.register(...e);r.push(e),i()&&a()};const o=s(),l=o[t];return"function"==typeof l?l.bind(o):l},construct:(e,t)=>new(s())(...t)}),d=new Set(["attributors","blots","formats","modules","themes","ui"]),c=e=>(e=>{const[t]=e.split("/");return d.has(t)})(e)?e:`modules/${e}`,b=e=>{const t=c(e),o="modules/";return t.startsWith(o)?t.slice(8):void 0},p=new Set(["attributors","blots","formats"]),h=(e,t,o)=>{const n=c(t.name),l=e.imports;l&&n in l||e.register(n,t.module),o&&(e=>{const[t]=e.split("/");return p.has(t)})(n)&&o.register(t.module)},f=t.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,default:void 0,validator:e=>"boolean"==typeof e?!1===e:"string"!=typeof e||""===e||("#"===e.charAt(0)||-1!==Object.keys(o).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:(n,l)=>{t.onMounted(()=>{s=!1,d()}),t.onBeforeUnmount(()=>{r=null,s=!0});let r,i,s=!1;const u=t.ref(),d=async()=>{var e,t;if(!u.value)return;const o=u.value,d=await a();if(!s&&u.value&&u.value===o){if(i=c(),n.modules)if(Array.isArray(n.modules))for(const e of n.modules)h(d,e,i.registry);else h(d,n.modules,i.registry);r=new d(u.value,i),O(n.content),r.on("text-change",g),r.on("selection-change",w),r.on("editor-change",x),"bubble"!==n.theme&&u.value.classList.remove("ql-bubble"),"snow"!==n.theme&&u.value.classList.remove("ql-snow"),null===(t=null===(e=f())||void 0===e?void 0:e.container)||void 0===t||t.addEventListener("mousedown",e=>{e.preventDefault()}),l.emit("ready",r)}},c=()=>{const e={};if(""!==n.theme&&(e.theme=n.theme),n.readOnly&&(e.readOnly=n.readOnly),n.placeholder&&(e.placeholder=n.placeholder),!1===n.toolbar?e.modules={toolbar:!1}:n.toolbar&&""!==n.toolbar&&(e.modules={toolbar:(()=>{if("object"==typeof n.toolbar)return n.toolbar;if("string"==typeof n.toolbar){return"#"===n.toolbar.charAt(0)?n.toolbar:o[n.toolbar]}})()}),n.modules){const t=(e=>{var t;const o={},n=Array.isArray(e)?e:[e];for(const l of n){const e=b(l.name);e&&(o[e]=null!==(t=l.options)&&void 0!==t?t:{})}return Object.keys(o).length>0?o:void 0})(n.modules);t&&(e.modules=Object.assign({},e.modules,t))}return Object.assign({},n.globalOptions,n.options,e)},p=e=>"object"==typeof e&&e?e.slice():e,f=()=>null==r?void 0:r.getModule("toolbar");let v;const m=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},g=(e,t,o)=>{v=p(T()),m(n.content)||l.emit("update:content",v),l.emit("textChange",{delta:e,oldContents:t,source:o})},y=t.ref(),w=(e,t,o)=>{y.value=!!(null==r?void 0:r.hasFocus()),l.emit("selectionChange",{range:e,oldRange:t,source:o})};t.watch(y,e=>{l.emit(e?"focus":"blur",u)});const x=(...e)=>{"text-change"===e[0]&&l.emit("editorChange",{name:e[0],delta:e[1],oldContents:e[2],source:e[3]}),"selection-change"===e[0]&&l.emit("editorChange",{name:e[0],range:e[1],oldRange:e[2],source:e[3]})},T=(e,t)=>"html"===n.contentType?k():"text"===n.contentType?q(e,t):null==r?void 0:r.getContents(e,t),O=(t,o="api")=>{const l=t||("delta"===n.contentType?new e:"");"html"===n.contentType?C(l):"text"===n.contentType?j(l,o):null==r||r.setContents(l,o),v=p(l)},q=(e,t)=>{var o;return null!==(o=null==r?void 0:r.getText(e,t))&&void 0!==o?o:""},j=(e,t="api")=>{null==r||r.setText(e,t)},k=()=>{var e;return null!==(e=null==r?void 0:r.root.innerHTML)&&void 0!==e?e:""},C=e=>{r&&(r.root.innerHTML=e)};return t.watch(()=>n.content,e=>{if(!r||!e||m(e))return;const o=r.getSelection();o&&t.nextTick(()=>null==r?void 0:r.setSelection(o)),O(e)},{deep:!0}),t.watch(()=>n.enable,e=>{r&&r.enable(e)}),{editor:u,getEditor:()=>u.value,getToolbar:()=>{var e;return null===(e=f())||void 0===e?void 0:e.container},getQuill:()=>{if(r)return r;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:T,setContents:O,getHTML:k,setHTML:C,pasteHTML:(e,t="api")=>{const o=null==r?void 0:r.clipboard.convert({html:e});o&&(null==r||r.setContents(o,t))},focus:()=>{null==r||r.focus()},getText:q,setText:j,reinit:()=>{t.nextTick(()=>{var e,t;!l.slots.toolbar&&r&&(null===(t=null===(e=f())||void 0===e?void 0:e.container)||void 0===t||t.remove()),d()})}}},render(){var e,o;return[null===(o=(e=this.$slots).toolbar)||void 0===o?void 0:o.call(e),t.h("div",{ref:"editor",...this.$attrs})]}});exports.Delta=e,exports.Quill=u,exports.QuillEditor=f,exports.getLoadedQuill=()=>n,exports.loadQuill=a;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.5.1
2
+ * VueQuill @vueup/vue-quill v1.5.3
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-02T03:36:43.438Z
10
+ * Date: 2026-06-03T00:25:15.762Z
11
11
  */
12
12
  import { defineComponent, h, onMounted, onBeforeUnmount, ref, watch, nextTick } from 'vue';
13
13
 
@@ -5596,6 +5596,55 @@ const Quill$1 = new Proxy(function QuillProxy() { }, {
5596
5596
  },
5597
5597
  });
5598
5598
 
5599
+ const quillRegistrationPathPrefixes = new Set([
5600
+ 'attributors',
5601
+ 'blots',
5602
+ 'formats',
5603
+ 'modules',
5604
+ 'themes',
5605
+ 'ui',
5606
+ ]);
5607
+ const isQuillRegistrationPath = (name) => {
5608
+ const [prefix] = name.split('/');
5609
+ return quillRegistrationPathPrefixes.has(prefix);
5610
+ };
5611
+ const getModuleRegistrationName = (name) => {
5612
+ return isQuillRegistrationPath(name) ? name : `modules/${name}`;
5613
+ };
5614
+ const getModuleOptionName = (name) => {
5615
+ const registrationName = getModuleRegistrationName(name);
5616
+ const modulePrefix = 'modules/';
5617
+ return registrationName.startsWith(modulePrefix)
5618
+ ? registrationName.slice(modulePrefix.length)
5619
+ : undefined;
5620
+ };
5621
+ const globalRegistryPathPrefixes = new Set(['attributors', 'blots', 'formats']);
5622
+ const usesParchmentRegistry = (name) => {
5623
+ const [prefix] = name.split('/');
5624
+ return globalRegistryPathPrefixes.has(prefix);
5625
+ };
5626
+ const getModuleOptions = (modules) => {
5627
+ var _a;
5628
+ const modulesOption = {};
5629
+ const registrations = Array.isArray(modules) ? modules : [modules];
5630
+ for (const module of registrations) {
5631
+ const optionName = getModuleOptionName(module.name);
5632
+ if (optionName)
5633
+ modulesOption[optionName] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
5634
+ }
5635
+ return Object.keys(modulesOption).length > 0 ? modulesOption : undefined;
5636
+ };
5637
+ const registerModule = (Quill, module, registry) => {
5638
+ const moduleName = getModuleRegistrationName(module.name);
5639
+ const quillImports = Quill.imports;
5640
+ if (!quillImports || !(moduleName in quillImports)) {
5641
+ Quill.register(moduleName, module.module);
5642
+ }
5643
+ if (registry && usesParchmentRegistry(moduleName)) {
5644
+ registry.register(module.module);
5645
+ }
5646
+ };
5647
+
5599
5648
  const QuillEditor = defineComponent({
5600
5649
  name: 'QuillEditor',
5601
5650
  inheritAttrs: false,
@@ -5679,14 +5728,6 @@ const QuillEditor = defineComponent({
5679
5728
  let quill;
5680
5729
  let options;
5681
5730
  const editor = ref();
5682
- // Register Module if not already registered
5683
- const registerModule = (Quill, moduleName, module) => {
5684
- const quillImports = Quill.imports;
5685
- if (quillImports && moduleName in quillImports) {
5686
- return;
5687
- }
5688
- Quill.register(moduleName, module);
5689
- };
5690
5731
  // Initialize Quill
5691
5732
  const initialize = async () => {
5692
5733
  var _a, _b;
@@ -5701,11 +5742,11 @@ const QuillEditor = defineComponent({
5701
5742
  if (props.modules) {
5702
5743
  if (Array.isArray(props.modules)) {
5703
5744
  for (const module of props.modules) {
5704
- registerModule(Quill, `modules/${module.name}`, module.module);
5745
+ registerModule(Quill, module, options.registry);
5705
5746
  }
5706
5747
  }
5707
5748
  else {
5708
- registerModule(Quill, `modules/${props.modules.name}`, props.modules.module);
5749
+ registerModule(Quill, props.modules, options.registry);
5709
5750
  }
5710
5751
  }
5711
5752
  // Create new Quill instance
@@ -5759,20 +5800,10 @@ const QuillEditor = defineComponent({
5759
5800
  };
5760
5801
  }
5761
5802
  if (props.modules) {
5762
- const modules = (() => {
5763
- var _a, _b;
5764
- const modulesOption = {};
5765
- if (Array.isArray(props.modules)) {
5766
- for (const module of props.modules) {
5767
- modulesOption[module.name] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
5768
- }
5769
- }
5770
- else {
5771
- modulesOption[props.modules.name] = (_b = props.modules.options) !== null && _b !== void 0 ? _b : {};
5772
- }
5773
- return modulesOption;
5774
- })();
5775
- clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
5803
+ const modules = getModuleOptions(props.modules);
5804
+ if (modules) {
5805
+ clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
5806
+ }
5776
5807
  }
5777
5808
  return Object.assign({}, props.globalOptions, props.options, clientOptions);
5778
5809
  };
@@ -7944,7 +7975,7 @@ var DataView = getNative(root, 'DataView');
7944
7975
  var Promise$1 = getNative(root, 'Promise');
7945
7976
 
7946
7977
  /* Built-in method references that are verified to be native. */
7947
- var Set = getNative(root, 'Set');
7978
+ var Set$1 = getNative(root, 'Set');
7948
7979
 
7949
7980
  /** `Object#toString` result references. */
7950
7981
  var mapTag$4 = '[object Map]',
@@ -7959,7 +7990,7 @@ var dataViewTag$3 = '[object DataView]';
7959
7990
  var dataViewCtorString = toSource(DataView),
7960
7991
  mapCtorString = toSource(Map),
7961
7992
  promiseCtorString = toSource(Promise$1),
7962
- setCtorString = toSource(Set),
7993
+ setCtorString = toSource(Set$1),
7963
7994
  weakMapCtorString = toSource(WeakMap$1);
7964
7995
 
7965
7996
  /**
@@ -7975,7 +8006,7 @@ var getTag = baseGetTag;
7975
8006
  if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3) ||
7976
8007
  (Map && getTag(new Map) != mapTag$4) ||
7977
8008
  (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
7978
- (Set && getTag(new Set) != setTag$4) ||
8009
+ (Set$1 && getTag(new Set$1) != setTag$4) ||
7979
8010
  (WeakMap$1 && getTag(new WeakMap$1) != weakMapTag$1)) {
7980
8011
  getTag = function(value) {
7981
8012
  var result = baseGetTag(value),