@vueup/vue-quill 1.4.0 → 1.5.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 +12 -4
- package/dist/vue-quill.cjs.prod.js +3 -3
- package/dist/vue-quill.d.ts +7 -2
- package/dist/vue-quill.esm-browser.js +12 -4
- package/dist/vue-quill.esm-browser.prod.js +3 -3
- package/dist/vue-quill.esm-bundler.js +12 -4
- package/dist/vue-quill.esm-bundler.prod.js +3 -3
- package/dist/vue-quill.global.js +12 -4
- package/dist/vue-quill.global.prod.js +3 -3
- package/package.json +1 -1
package/dist/vue-quill.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* VueQuill @vueup/vue-quill v1.
|
|
2
|
+
* VueQuill @vueup/vue-quill v1.5.1
|
|
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-02T03:36:43.438Z
|
|
11
11
|
*/
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
@@ -131,9 +131,12 @@ const QuillEditor = vue.defineComponent({
|
|
|
131
131
|
},
|
|
132
132
|
},
|
|
133
133
|
toolbar: {
|
|
134
|
-
type: [String, Array, Object],
|
|
134
|
+
type: [String, Array, Object, Boolean],
|
|
135
135
|
required: false,
|
|
136
|
+
default: undefined,
|
|
136
137
|
validator: (value) => {
|
|
138
|
+
if (typeof value === 'boolean')
|
|
139
|
+
return value === false;
|
|
137
140
|
if (typeof value === 'string' && value !== '') {
|
|
138
141
|
return value.charAt(0) === '#'
|
|
139
142
|
? true
|
|
@@ -235,7 +238,12 @@ const QuillEditor = vue.defineComponent({
|
|
|
235
238
|
clientOptions.readOnly = props.readOnly;
|
|
236
239
|
if (props.placeholder)
|
|
237
240
|
clientOptions.placeholder = props.placeholder;
|
|
238
|
-
if (props.toolbar
|
|
241
|
+
if (props.toolbar === false) {
|
|
242
|
+
clientOptions.modules = {
|
|
243
|
+
toolbar: false,
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
else if (props.toolbar && props.toolbar !== '') {
|
|
239
247
|
clientOptions.modules = {
|
|
240
248
|
toolbar: (() => {
|
|
241
249
|
if (typeof props.toolbar === 'object') {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* VueQuill @vueup/vue-quill v1.
|
|
2
|
+
* VueQuill @vueup/vue-quill v1.5.1
|
|
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-02T03:36:43.438Z
|
|
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],required:!1,validator: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=
|
|
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;
|
package/dist/vue-quill.d.ts
CHANGED
|
@@ -56,8 +56,9 @@ default: string;
|
|
|
56
56
|
validator: (value: string) => boolean;
|
|
57
57
|
};
|
|
58
58
|
toolbar: {
|
|
59
|
-
type:
|
|
59
|
+
type: PropType<ToolbarPropType>;
|
|
60
60
|
required: false;
|
|
61
|
+
default: undefined;
|
|
61
62
|
validator: (value: string | unknown) => boolean;
|
|
62
63
|
};
|
|
63
64
|
modules: {
|
|
@@ -113,8 +114,9 @@ default: string;
|
|
|
113
114
|
validator: (value: string) => boolean;
|
|
114
115
|
};
|
|
115
116
|
toolbar: {
|
|
116
|
-
type:
|
|
117
|
+
type: PropType<ToolbarPropType>;
|
|
117
118
|
required: false;
|
|
119
|
+
default: undefined;
|
|
118
120
|
validator: (value: string | unknown) => boolean;
|
|
119
121
|
};
|
|
120
122
|
modules: {
|
|
@@ -142,6 +144,9 @@ contentType: "delta" | "html" | "text";
|
|
|
142
144
|
enable: boolean;
|
|
143
145
|
readOnly: boolean;
|
|
144
146
|
theme: "" | "snow" | "bubble";
|
|
147
|
+
toolbar: ToolbarPropType;
|
|
145
148
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
146
149
|
|
|
150
|
+
declare type ToolbarPropType = string | unknown[] | Record<string, unknown> | false;
|
|
151
|
+
|
|
147
152
|
export { }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* VueQuill @vueup/vue-quill v1.
|
|
2
|
+
* VueQuill @vueup/vue-quill v1.5.1
|
|
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-02T03:36:43.438Z
|
|
11
11
|
*/
|
|
12
12
|
import { defineComponent, h, onMounted, onBeforeUnmount, ref, watch, nextTick } from 'vue';
|
|
13
13
|
|
|
@@ -5630,9 +5630,12 @@ const QuillEditor = defineComponent({
|
|
|
5630
5630
|
},
|
|
5631
5631
|
},
|
|
5632
5632
|
toolbar: {
|
|
5633
|
-
type: [String, Array, Object],
|
|
5633
|
+
type: [String, Array, Object, Boolean],
|
|
5634
5634
|
required: false,
|
|
5635
|
+
default: undefined,
|
|
5635
5636
|
validator: (value) => {
|
|
5637
|
+
if (typeof value === 'boolean')
|
|
5638
|
+
return value === false;
|
|
5636
5639
|
if (typeof value === 'string' && value !== '') {
|
|
5637
5640
|
return value.charAt(0) === '#'
|
|
5638
5641
|
? true
|
|
@@ -5734,7 +5737,12 @@ const QuillEditor = defineComponent({
|
|
|
5734
5737
|
clientOptions.readOnly = props.readOnly;
|
|
5735
5738
|
if (props.placeholder)
|
|
5736
5739
|
clientOptions.placeholder = props.placeholder;
|
|
5737
|
-
if (props.toolbar
|
|
5740
|
+
if (props.toolbar === false) {
|
|
5741
|
+
clientOptions.modules = {
|
|
5742
|
+
toolbar: false,
|
|
5743
|
+
};
|
|
5744
|
+
}
|
|
5745
|
+
else if (props.toolbar && props.toolbar !== '') {
|
|
5738
5746
|
clientOptions.modules = {
|
|
5739
5747
|
toolbar: (() => {
|
|
5740
5748
|
if (typeof props.toolbar === 'object') {
|