Reputation: 1083
Whenever I create another instance of the editor (in my case, through an onkeypress event), I lose focus on the editor I was typing on when the new editor is created. How can I prevent all editors from losing focus on any event?
Upvotes: 10
Views: 13384
Reputation: 9034
Quill has a method called focus()
for this.
var quill = new Quill('#editor', {
theme: 'snow'
});
// This will focus the instance of quill editor
quill.focus()
Upvotes: 12