Skip to content

Commit 6890826

Browse files
authored
Merge pull request surmon-china#194 from chrisladams/feature/prevent-auto-focus
Feature/prevent auto focus
2 parents 68d0d79 + 01bdda1 commit 6890826

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

dist/vue-quill-editor.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/editor.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@
4949
props: {
5050
content: String,
5151
value: String,
52-
disabled: Boolean,
52+
disabled: {
53+
type: Boolean,
54+
default: false
55+
},
5356
options: {
5457
type: Object,
5558
required: false,
@@ -78,15 +81,17 @@
7881
7982
// Instance
8083
this.quill = new Quill(this.$refs.editor, this._options)
84+
85+
this.quill.enable(false)
8186
8287
// Set editor content
8388
if (this.value || this.content) {
8489
this.quill.pasteHTML(this.value || this.content)
8590
}
8691
8792
// Disabled editor
88-
if (this.disabled) {
89-
this.quill.enable(false)
93+
if (!this.disabled) {
94+
this.quill.enable(true)
9095
}
9196
9297
// Mark model as touched if editor lost focus

0 commit comments

Comments
 (0)