Skip to content

Commit

Permalink
modifying enabled state before pasting html to prevent auto-focusing …
Browse files Browse the repository at this point in the history
…editors on load
  • Loading branch information
Chris committed Apr 3, 2018
1 parent 68d0d79 commit 46da8ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/vue-quill-editor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/editor.vue
Expand Up @@ -78,15 +78,17 @@
// Instance
this.quill = new Quill(this.$refs.editor, this._options)
this.quill.enable(false)
// Set editor content
if (this.value || this.content) {
this.quill.pasteHTML(this.value || this.content)
}
// Disabled editor
if (this.disabled) {
this.quill.enable(false)
if (!this.disabled) {
this.quill.enable(true)
}
// Mark model as touched if editor lost focus
Expand Down

0 comments on commit 46da8ed

Please sign in to comment.