@vueup/vue-quill 1.5.2 → 1.5.4

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.2
2
+ * VueQuill @vueup/vue-quill v1.5.4
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-02T23:50:41.596Z
10
+ * Date: 2026-06-19T06:34:03.260Z
11
11
  */
12
12
  'use strict';
13
13
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.5.2
2
+ * VueQuill @vueup/vue-quill v1.5.4
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-02T23:50:41.596Z
10
+ * Date: 2026-06-19T06:34:03.260Z
11
11
  */
12
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.2
2
+ * VueQuill @vueup/vue-quill v1.5.4
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-02T23:50:41.596Z
10
+ * Date: 2026-06-19T06:34:03.260Z
11
11
  */
12
12
  import { defineComponent, h, onMounted, onBeforeUnmount, ref, watch, nextTick } from 'vue';
13
13