@vueup/vue-quill 1.0.0-beta.1 → 1.0.0-beta.10
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 +86 -44
- package/dist/vue-quill.cjs.prod.js +4 -4
- package/dist/vue-quill.d.ts +130 -68
- package/dist/vue-quill.esm-browser.js +14806 -12129
- package/dist/vue-quill.esm-browser.prod.js +4 -4
- package/dist/vue-quill.esm-bundler.js +85 -43
- package/dist/vue-quill.esm-bundler.prod.js +4 -4
- package/dist/vue-quill.global.js +14808 -12131
- package/dist/vue-quill.global.prod.js +4 -4
- package/dist/vue-quill.snow.css +1 -1
- package/dist/vue-quill.snow.prod.css +1 -1
- package/package.json +3 -3
package/dist/vue-quill.cjs.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* VueQuill @vueup/vue-quill v1.0.0-beta.
|
|
2
|
+
* VueQuill @vueup/vue-quill v1.0.0-beta.10
|
|
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)
|
|
8
|
+
* Copyright (c) 2022 Ahmad Luthfi Masruri
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date:
|
|
10
|
+
* Date: 2022-09-03T02:53:33.894Z
|
|
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[
|
|
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
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
|
|
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
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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 [
|
|
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.
|
|
2
|
+
* VueQuill @vueup/vue-quill v1.0.0-beta.10
|
|
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)
|
|
8
|
+
* Copyright (c) 2022 Ahmad Luthfi Masruri
|
|
9
9
|
* Released under the MIT license
|
|
10
|
-
* Date:
|
|
10
|
+
* Date: 2022-09-03T02:53:33.894Z
|
|
11
11
|
*/
|
|
12
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("quill"),t=require("quill-delta"),
|
|
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;
|
package/dist/vue-quill.d.ts
CHANGED
|
@@ -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:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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 { }
|