@vueup/vue-quill 1.0.0-beta.1 → 1.0.0-beta.11

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.
@@ -1,13 +1,13 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.0.0-beta.1
2
+ * VueQuill @vueup/vue-quill v1.0.0-beta.11
3
3
  * https://vueup.github.io/vue-quill/
4
4
  *
5
5
  * Includes quill v1.3.7
6
6
  * https://quilljs.com/
7
7
  *
8
- * Copyright (c) 2021 Ahmad Luthfi Masruri
8
+ * Copyright (c) 2022 Ahmad Luthfi Masruri
9
9
  * Released under the MIT license
10
- * Date: 2021-04-15T13:32:32.399Z
10
+ * Date: 2022-10-21T15:41:46.444Z
11
11
  */
12
12
  'use strict';
13
13
 
@@ -17,7 +17,7 @@ var Quill = require('quill');
17
17
  var quillDelta = require('quill-delta');
18
18
  var vue = require('vue');
19
19
 
20
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
20
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e["default"] : e; }
21
21
 
22
22
  var Quill__default = /*#__PURE__*/_interopDefaultLegacy(Quill);
23
23
  var quillDelta__default = /*#__PURE__*/_interopDefaultLegacy(quillDelta);
@@ -99,6 +99,10 @@ const QuillEditor = vue.defineComponent({
99
99
  return true;
100
100
  },
101
101
  },
102
+ modules: {
103
+ type: Object,
104
+ required: false,
105
+ },
102
106
  options: {
103
107
  type: Object,
104
108
  required: false,
@@ -130,29 +134,40 @@ const QuillEditor = vue.defineComponent({
130
134
  // Initialize Quill
131
135
  const initialize = () => {
132
136
  var _a;
133
- if (editor.value) {
134
- options = composeOptions();
135
- // Create new instance
136
- quill = new Quill__default(editor.value, options);
137
- // Set editor content
138
- setContents(props.content);
139
- // Set event handlers
140
- quill.on('text-change', handleTextChange);
141
- quill.on('selection-change', handleSelectionChange);
142
- quill.on('editor-change', handleEditorChange);
143
- // Remove editor class when theme changes
144
- if (props.theme !== 'bubble')
145
- editor.value.classList.remove('ql-bubble');
146
- if (props.theme !== 'snow')
147
- editor.value.classList.remove('ql-snow');
148
- // Fix clicking the quill toolbar is detected as blur event
149
- (_a = quill
150
- .getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container.addEventListener('mousedown', (e) => {
151
- e.preventDefault();
152
- });
153
- // Emit ready event
154
- ctx.emit('ready', quill);
137
+ if (!editor.value)
138
+ return;
139
+ options = composeOptions();
140
+ // Register modules
141
+ if (props.modules) {
142
+ if (Array.isArray(props.modules)) {
143
+ for (const module of props.modules) {
144
+ Quill__default.register(`modules/${module.name}`, module.module);
145
+ }
146
+ }
147
+ else {
148
+ Quill__default.register(`modules/${props.modules.name}`, props.modules.module);
149
+ }
155
150
  }
151
+ // Create new Quill instance
152
+ quill = new Quill__default(editor.value, options);
153
+ // Set editor content
154
+ setContents(props.content);
155
+ // Set event handlers
156
+ quill.on('text-change', handleTextChange);
157
+ quill.on('selection-change', handleSelectionChange);
158
+ quill.on('editor-change', handleEditorChange);
159
+ // Remove editor class when theme changes
160
+ if (props.theme !== 'bubble')
161
+ editor.value.classList.remove('ql-bubble');
162
+ if (props.theme !== 'snow')
163
+ editor.value.classList.remove('ql-snow');
164
+ // Fix clicking the quill toolbar is detected as blur event
165
+ (_a = quill
166
+ .getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container.addEventListener('mousedown', (e) => {
167
+ e.preventDefault();
168
+ });
169
+ // Emit ready event
170
+ ctx.emit('ready', quill);
156
171
  };
157
172
  // Compose Options
158
173
  const composeOptions = () => {
@@ -179,6 +194,22 @@ const QuillEditor = vue.defineComponent({
179
194
  })(),
180
195
  };
181
196
  }
197
+ if (props.modules) {
198
+ const modules = (() => {
199
+ var _a, _b;
200
+ const modulesOption = {};
201
+ if (Array.isArray(props.modules)) {
202
+ for (const module of props.modules) {
203
+ modulesOption[module.name] = (_a = module.options) !== null && _a !== void 0 ? _a : {};
204
+ }
205
+ }
206
+ else {
207
+ modulesOption[props.modules.name] = (_b = props.modules.options) !== null && _b !== void 0 ? _b : {};
208
+ }
209
+ return modulesOption;
210
+ })();
211
+ clientOptions.modules = Object.assign({}, clientOptions.modules, modules);
212
+ }
182
213
  return Object.assign({}, props.globalOptions, props.options, clientOptions);
183
214
  };
184
215
  const handleTextChange = (delta, oldContents, source) => {
@@ -229,39 +260,45 @@ const QuillEditor = vue.defineComponent({
229
260
  make sure to call this method when the editor ready
230
261
  or use v-on:ready="onReady(quill)" event instead.`;
231
262
  };
232
- const getContents = () => {
263
+ const getContents = (index, length) => {
233
264
  if (props.contentType === 'html') {
234
265
  return getHTML();
235
266
  }
236
267
  else if (props.contentType === 'text') {
237
- return getText();
268
+ return getText(index, length);
238
269
  }
239
- return quill === null || quill === void 0 ? void 0 : quill.getContents();
270
+ return quill === null || quill === void 0 ? void 0 : quill.getContents(index, length);
240
271
  };
241
- const setContents = (content) => {
272
+ const setContents = (content, source = 'api') => {
242
273
  if (props.contentType === 'html') {
243
274
  setHTML(content);
244
275
  }
245
276
  else if (props.contentType === 'text') {
246
- setText(content);
277
+ setText(content, source);
247
278
  }
248
279
  else {
249
- quill === null || quill === void 0 ? void 0 : quill.setContents(content);
280
+ quill === null || quill === void 0 ? void 0 : quill.setContents(content, source);
250
281
  }
251
282
  };
252
- const getText = () => {
283
+ const getText = (index, length) => {
253
284
  var _a;
254
- return (_a = quill === null || quill === void 0 ? void 0 : quill.getText()) !== null && _a !== void 0 ? _a : '';
285
+ return (_a = quill === null || quill === void 0 ? void 0 : quill.getText(index, length)) !== null && _a !== void 0 ? _a : '';
255
286
  };
256
- const setText = (text) => {
257
- quill === null || quill === void 0 ? void 0 : quill.setText(text);
287
+ const setText = (text, source = 'api') => {
288
+ quill === null || quill === void 0 ? void 0 : quill.setText(text, source);
258
289
  };
259
290
  const getHTML = () => {
260
291
  var _a;
261
292
  return (_a = quill === null || quill === void 0 ? void 0 : quill.root.innerHTML) !== null && _a !== void 0 ? _a : '';
262
293
  };
263
294
  const setHTML = (html) => {
264
- quill === null || quill === void 0 ? void 0 : quill.clipboard.dangerouslyPasteHTML(html);
295
+ if (quill)
296
+ quill.root.innerHTML = html;
297
+ };
298
+ const pasteHTML = (html, source = 'api') => {
299
+ const delta = quill === null || quill === void 0 ? void 0 : quill.clipboard.convert(html);
300
+ if (delta)
301
+ quill === null || quill === void 0 ? void 0 : quill.setContents(delta, source);
265
302
  };
266
303
  const reinit = () => {
267
304
  vue.nextTick(() => {
@@ -269,14 +306,15 @@ const QuillEditor = vue.defineComponent({
269
306
  if (!ctx.slots.toolbar && quill)
270
307
  (_a = quill.getModule('toolbar')) === null || _a === void 0 ? void 0 : _a.container.remove();
271
308
  initialize();
272
- console.log('reinit call');
273
309
  });
274
310
  };
275
- vue.watch(() => props.content, (newContent) => {
276
- if (!quill || !newContent || newContent === props.content)
277
- return;
278
- setContents(newContent);
279
- });
311
+ // watch(
312
+ // () => props.content,
313
+ // (newContent, oldContents) => {
314
+ // if (!quill || !newContent || newContent === oldContents) return
315
+ // setContents(newContent)
316
+ // }
317
+ // )
280
318
  vue.watch(() => props.enable, (newValue) => {
281
319
  if (quill)
282
320
  quill.enable(newValue);
@@ -290,6 +328,7 @@ const QuillEditor = vue.defineComponent({
290
328
  setContents,
291
329
  getHTML,
292
330
  setHTML,
331
+ pasteHTML,
293
332
  getText,
294
333
  setText,
295
334
  reinit,
@@ -297,7 +336,10 @@ const QuillEditor = vue.defineComponent({
297
336
  },
298
337
  render() {
299
338
  var _a, _b;
300
- return [(_b = (_a = this.$slots).toolbar) === null || _b === void 0 ? void 0 : _b.call(_a), vue.h('div', { ref: 'editor', ...this.$attrs })];
339
+ return [
340
+ (_b = (_a = this.$slots).toolbar) === null || _b === void 0 ? void 0 : _b.call(_a),
341
+ vue.h('div', { ref: 'editor', ...this.$attrs }),
342
+ ];
301
343
  },
302
344
  });
303
345
 
@@ -1,12 +1,12 @@
1
1
  /*!
2
- * VueQuill @vueup/vue-quill v1.0.0-beta.1
2
+ * VueQuill @vueup/vue-quill v1.0.0-beta.11
3
3
  * https://vueup.github.io/vue-quill/
4
4
  *
5
5
  * Includes quill v1.3.7
6
6
  * https://quilljs.com/
7
7
  *
8
- * Copyright (c) 2021 Ahmad Luthfi Masruri
8
+ * Copyright (c) 2022 Ahmad Luthfi Masruri
9
9
  * Released under the MIT license
10
- * Date: 2021-04-15T13:32:32.399Z
10
+ * Date: 2022-10-21T15:41:46.444Z
11
11
  */
12
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("quill"),t=require("quill-delta"),l=require("vue");function o(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n=o(e),r=o(t);const a={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"]]},i=l.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object],default:()=>{}},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(a).indexOf(e))},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(e,t)=>{let o,r;l.onMounted((()=>{d()})),l.onBeforeUnmount((()=>{o=null}));const i=l.ref(),d=()=>{var l;i.value&&(r=u(),o=new n(i.value,r),p(e.content),o.on("text-change",s),o.on("selection-change",b),o.on("editor-change",h),"bubble"!==e.theme&&i.value.classList.remove("ql-bubble"),"snow"!==e.theme&&i.value.classList.remove("ql-snow"),null===(l=o.getModule("toolbar"))||void 0===l||l.container.addEventListener("mousedown",(e=>{e.preventDefault()})),t.emit("ready",o))},u=()=>{const t={};return""!==e.theme&&(t.theme=e.theme),e.readOnly&&(t.readOnly=e.readOnly),e.placeholder&&(t.placeholder=e.placeholder),e.toolbar&&""!==e.toolbar&&(t.modules={toolbar:(()=>{if("object"==typeof e.toolbar)return e.toolbar;if("string"==typeof e.toolbar){return"#"===e.toolbar.charAt(0)?e.toolbar:a[e.toolbar]}})()}),Object.assign({},e.globalOptions,e.options,t)},s=(e,l,o)=>{t.emit("update:content",g()),t.emit("textChange",{delta:e,oldContents:l,source:o})},c=l.ref(),b=(e,l,n)=>{c.value=!!(null==o?void 0:o.hasFocus()),t.emit("selectionChange",{range:e,oldRange:l,source:n})};l.watch(c,(e=>{t.emit(e?"focus":"blur",i)}));const h=(...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]})},g=()=>"html"===e.contentType?y():"text"===e.contentType?v():null==o?void 0:o.getContents(),p=t=>{"html"===e.contentType?f(t):"text"===e.contentType?m(t):null==o||o.setContents(t)},v=()=>{var e;return null!==(e=null==o?void 0:o.getText())&&void 0!==e?e:""},m=e=>{null==o||o.setText(e)},y=()=>{var e;return null!==(e=null==o?void 0:o.root.innerHTML)&&void 0!==e?e:""},f=e=>{null==o||o.clipboard.dangerouslyPasteHTML(e)};return l.watch((()=>e.content),(t=>{o&&t&&t!==e.content&&p(t)})),l.watch((()=>e.enable),(e=>{o&&o.enable(e)})),{editor:i,getEditor:()=>i.value,getToolbar:()=>{var e;return null===(e=null==o?void 0:o.getModule("toolbar"))||void 0===e?void 0:e.container},getQuill:()=>{if(o)return o;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:g,setContents:p,getHTML:y,setHTML:f,getText:v,setText:m,reinit:()=>{l.nextTick((()=>{var e;!t.slots.toolbar&&o&&(null===(e=o.getModule("toolbar"))||void 0===e||e.container.remove()),d(),console.log("reinit call")}))}}},render(){var e,t;return[null===(t=(e=this.$slots).toolbar)||void 0===t?void 0:t.call(e),l.h("div",{ref:"editor",...this.$attrs})]}});exports.Quill=n,exports.Delta=r,exports.QuillEditor=i;
12
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("quill"),t=require("quill-delta"),o=require("vue");function l(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n=l(e),r=l(t);const i={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"]]},a=o.defineComponent({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object],default:()=>{}},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(i).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:(e,t)=>{let l,r;o.onMounted((()=>{d()})),o.onBeforeUnmount((()=>{l=null}));const a=o.ref(),d=()=>{var o;if(a.value){if(r=s(),e.modules)if(Array.isArray(e.modules))for(const t of e.modules)n.register(`modules/${t.name}`,t.module);else n.register(`modules/${e.modules.name}`,e.modules.module);l=new n(a.value,r),h(e.content),l.on("text-change",u),l.on("selection-change",b),l.on("editor-change",m),"bubble"!==e.theme&&a.value.classList.remove("ql-bubble"),"snow"!==e.theme&&a.value.classList.remove("ql-snow"),null===(o=l.getModule("toolbar"))||void 0===o||o.container.addEventListener("mousedown",(e=>{e.preventDefault()})),t.emit("ready",l)}},s=()=>{const t={};if(""!==e.theme&&(t.theme=e.theme),e.readOnly&&(t.readOnly=e.readOnly),e.placeholder&&(t.placeholder=e.placeholder),e.toolbar&&""!==e.toolbar&&(t.modules={toolbar:(()=>{if("object"==typeof e.toolbar)return e.toolbar;if("string"==typeof e.toolbar){return"#"===e.toolbar.charAt(0)?e.toolbar:i[e.toolbar]}})()}),e.modules){const o=(()=>{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})();t.modules=Object.assign({},t.modules,o)}return Object.assign({},e.globalOptions,e.options,t)},u=(e,o,l)=>{t.emit("update:content",p()),t.emit("textChange",{delta:e,oldContents:o,source:l})},c=o.ref(),b=(e,o,n)=>{c.value=!!(null==l?void 0:l.hasFocus()),t.emit("selectionChange",{range:e,oldRange:o,source:n})};o.watch(c,(e=>{t.emit(e?"focus":"blur",a)}));const m=(...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]})},p=(t,o)=>"html"===e.contentType?f():"text"===e.contentType?g(t,o):null==l?void 0:l.getContents(t,o),h=(t,o="api")=>{"html"===e.contentType?y(t):"text"===e.contentType?v(t,o):null==l||l.setContents(t,o)},g=(e,t)=>{var o;return null!==(o=null==l?void 0:l.getText(e,t))&&void 0!==o?o:""},v=(e,t="api")=>{null==l||l.setText(e,t)},f=()=>{var e;return null!==(e=null==l?void 0:l.root.innerHTML)&&void 0!==e?e:""},y=e=>{l&&(l.root.innerHTML=e)};return 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:p,setContents:h,getHTML:f,setHTML:y,pasteHTML:(e,t="api")=>{const o=null==l?void 0:l.clipboard.convert(e);o&&(null==l||l.setContents(o,t))},getText:g,setText:v,reinit:()=>{o.nextTick((()=>{var e;!t.slots.toolbar&&l&&(null===(e=l.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=n,exports.Delta=r,exports.QuillEditor=a;
@@ -1,79 +1,141 @@
1
+ import { AllowedComponentProps } from 'vue';
2
+ import { ComponentCustomProps } from 'vue';
3
+ import { ComponentOptionsMixin } from 'vue';
4
+ import { DefineComponent } from 'vue';
1
5
  import Delta from 'quill-delta';
6
+ import { ExtractPropTypes } from 'vue';
2
7
  import { PropType } from 'vue';
3
8
  import Quill from 'quill';
4
9
  import { QuillOptionsStatic } from 'quill';
10
+ import { Ref } from 'vue';
11
+ import { Sources } from 'quill';
12
+ import { VNodeProps } from 'vue';
13
+
5
14
  export { Delta }
15
+
16
+ declare type Module = {
17
+ name: string;
18
+ module: any;
19
+ options?: object;
20
+ };
21
+
6
22
  export { Quill }
7
23
 
8
- export declare const QuillEditor: import("vue").DefineComponent<{
9
- content: {
10
- type: PropType<string | Delta>;
11
- default: () => void;
12
- };
13
- contentType: {
14
- type: PropType<"delta" | "html" | "text">;
15
- default: string;
16
- validator: (value: string) => boolean;
17
- };
18
- enable: {
19
- type: BooleanConstructor;
20
- default: boolean;
21
- };
22
- readOnly: {
23
- type: BooleanConstructor;
24
- default: boolean;
25
- };
26
- placeholder: {
27
- type: StringConstructor;
28
- required: false;
29
- };
30
- theme: {
31
- type: PropType<"" | "snow" | "bubble">;
32
- default: string;
33
- validator: (value: string) => boolean;
34
- };
35
- toolbar: {
36
- type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
37
- required: false;
38
- validator: (value: string | unknown) => boolean;
39
- };
40
- options: {
41
- type: PropType<QuillOptionsStatic>;
42
- required: false;
43
- };
44
- globalOptions: {
45
- type: PropType<QuillOptionsStatic>;
46
- required: false;
47
- };
24
+ export declare const QuillEditor: DefineComponent< {
25
+ content: {
26
+ type: PropType<string | Delta>;
27
+ default: () => void;
28
+ };
29
+ contentType: {
30
+ type: PropType<"delta" | "html" | "text">;
31
+ default: string;
32
+ validator: (value: string) => boolean;
33
+ };
34
+ enable: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ readOnly: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ placeholder: {
43
+ type: StringConstructor;
44
+ required: false;
45
+ };
46
+ theme: {
47
+ type: PropType<"" | "snow" | "bubble">;
48
+ default: string;
49
+ validator: (value: string) => boolean;
50
+ };
51
+ toolbar: {
52
+ type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
53
+ required: false;
54
+ validator: (value: string | unknown) => boolean;
55
+ };
56
+ modules: {
57
+ type: PropType<Module | Module[]>;
58
+ required: false;
59
+ };
60
+ options: {
61
+ type: PropType<QuillOptionsStatic>;
62
+ required: false;
63
+ };
64
+ globalOptions: {
65
+ type: PropType<QuillOptionsStatic>;
66
+ required: false;
67
+ };
68
+ }, {
69
+ editor: Ref<Element | undefined>;
70
+ getEditor: () => Element;
71
+ getToolbar: () => Element;
72
+ getQuill: () => Quill;
73
+ getContents: (index?: number, length?: number) => string | Delta | undefined;
74
+ setContents: (content: string | Delta, source?: Sources) => void;
75
+ getHTML: () => string;
76
+ setHTML: (html: string) => void;
77
+ pasteHTML: (html: string, source?: Sources) => void;
78
+ getText: (index?: number, length?: number) => string;
79
+ setText: (text: string, source?: Sources) => void;
80
+ reinit: () => void;
81
+ }, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("textChange" | "selectionChange" | "editorChange" | "update:content" | "focus" | "blur" | "ready")[], "textChange" | "selectionChange" | "editorChange" | "update:content" | "focus" | "blur" | "ready", VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
82
+ content: {
83
+ type: PropType<string | Delta>;
84
+ default: () => void;
85
+ };
86
+ contentType: {
87
+ type: PropType<"delta" | "html" | "text">;
88
+ default: string;
89
+ validator: (value: string) => boolean;
90
+ };
91
+ enable: {
92
+ type: BooleanConstructor;
93
+ default: boolean;
94
+ };
95
+ readOnly: {
96
+ type: BooleanConstructor;
97
+ default: boolean;
98
+ };
99
+ placeholder: {
100
+ type: StringConstructor;
101
+ required: false;
102
+ };
103
+ theme: {
104
+ type: PropType<"" | "snow" | "bubble">;
105
+ default: string;
106
+ validator: (value: string) => boolean;
107
+ };
108
+ toolbar: {
109
+ type: (StringConstructor | ObjectConstructor | ArrayConstructor)[];
110
+ required: false;
111
+ validator: (value: string | unknown) => boolean;
112
+ };
113
+ modules: {
114
+ type: PropType<Module | Module[]>;
115
+ required: false;
116
+ };
117
+ options: {
118
+ type: PropType<QuillOptionsStatic>;
119
+ required: false;
120
+ };
121
+ globalOptions: {
122
+ type: PropType<QuillOptionsStatic>;
123
+ required: false;
124
+ };
125
+ }>> & {
126
+ onTextChange?: ((...args: any[]) => any) | undefined;
127
+ onSelectionChange?: ((...args: any[]) => any) | undefined;
128
+ onEditorChange?: ((...args: any[]) => any) | undefined;
129
+ "onUpdate:content"?: ((...args: any[]) => any) | undefined;
130
+ onFocus?: ((...args: any[]) => any) | undefined;
131
+ onBlur?: ((...args: any[]) => any) | undefined;
132
+ onReady?: ((...args: any[]) => any) | undefined;
48
133
  }, {
49
- editor: import("vue").Ref<Element | undefined>;
50
- getEditor: () => Element;
51
- getToolbar: () => Element;
52
- getQuill: () => Quill;
53
- getContents: () => string | Delta | undefined;
54
- setContents: (content: string | Delta) => void;
55
- getHTML: () => string;
56
- setHTML: (html: string) => void;
57
- getText: () => string;
58
- setText: (text: string) => void;
59
- reinit: () => void;
60
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("textChange" | "selectionChange" | "editorChange" | "update:content" | "focus" | "blur" | "ready")[], "textChange" | "selectionChange" | "editorChange" | "update:content" | "focus" | "blur" | "ready", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
61
- content: string | Delta;
62
- contentType: "delta" | "html" | "text";
63
- enable: boolean;
64
- readOnly: boolean;
65
- theme: "" | "snow" | "bubble";
66
- } & {
67
- placeholder?: string | undefined;
68
- toolbar?: unknown;
69
- options?: QuillOptionsStatic | undefined;
70
- globalOptions?: QuillOptionsStatic | undefined;
71
- }>, {
72
- content: string | Delta;
73
- contentType: "delta" | "html" | "text";
74
- enable: boolean;
75
- readOnly: boolean;
76
- theme: "" | "snow" | "bubble";
134
+ content: string | Delta;
135
+ contentType: "delta" | "html" | "text";
136
+ enable: boolean;
137
+ readOnly: boolean;
138
+ theme: "" | "snow" | "bubble";
77
139
  }>;
78
140
 
79
141
  export { }