@@ -5,43 +5,50 @@ import "quill/dist/quill.bubble.css";
5
5
6
6
import { quillEditor } from " quill-vuejs" ;
7
7
export default {
8
- data () {
8
+ // data() {
9
+
10
+ // },
11
+ setup () {
9
12
return {
10
- content: " <h2>I am Example</h2>" ,
11
- editorOption: {
12
- // Some Quill options...
13
+ data: {
14
+ content: " " , // <h2>I am Example</h2>
15
+ editorOption: {
16
+ // Some Quill options...
17
+ },
13
18
},
14
19
};
15
20
},
16
- components: {
17
- quillEditor,
18
- },
19
- methods: {
20
- onEditorBlur (quill ) {
21
- console .log (" editor blur!" , quill);
22
- },
23
- onEditorFocus (quill ) {
24
- console .log (" editor focus!" , quill);
25
- },
26
- onEditorReady (quill ) {
27
- console .log (" editor ready!" , quill);
28
- },
29
- onEditorChange ({ quill, html, text }) {
30
- console .log (" editor change!" , quill, html, text);
31
- this .content = html;
32
- },
33
- },
21
+ // components: {
22
+ // quillEditor,
23
+ // },
24
+ // methods: {
25
+ // onEditorBlur(quill) {
26
+ // console.log("editor blur!", quill);
27
+ // },
28
+ // onEditorFocus(quill) {
29
+ // console.log("editor focus!", quill);
30
+ // },
31
+ // onEditorReady(quill) {
32
+ // console.log("editor ready!", quill);
33
+ // },
34
+ // onEditorChange({ quill, html, text }) {
35
+ // console.log("editor change!", quill, html, text);
36
+ // this.content = html;
37
+ // },
38
+ // },
34
39
};
35
40
</script >
36
41
37
42
<template >
38
- <quill-editor
39
- :content =" content"
40
- :options =" editorOption"
41
- @blur =" onEditorBlur($event)"
42
- @focus =" onEditorFocus($event)"
43
- @ready =" onEditorReady($event)"
44
- />
43
+ <div >
44
+ <quill-editor
45
+ :content =" content"
46
+ :options =" editorOption"
47
+ @blur =" onEditorBlur($event)"
48
+ @focus =" onEditorFocus($event)"
49
+ @ready =" onEditorReady($event)"
50
+ ></quill-editor >
51
+ </div >
45
52
</template >
46
53
47
54
<style >
0 commit comments