vue-quill-editor icon indicating copy to clipboard operation
vue-quill-editor copied to clipboard

Move cursor to the final

Open arieltoledo opened this issue 4 years ago • 3 comments

Hi, how can I use the Quill Api ? I need to use the focus method of the editor so cursor goes to the final of the line.

arieltoledo avatar Aug 05 '20 22:08 arieltoledo

You can use setSelection

this.$refs.input.quill.setSelection(this.content.length, 0);

damsltc57 avatar Sep 28 '20 13:09 damsltc57

@damsltc57 thanks for the response but it doesnt work either. This is my code, when ever add new content from a select box, cursor goes back to the begining of line. onItemClick (response) { this.content = this.removeHtmlTags(this.content) + this.removeHtmlTags(response) this.$refs.editor.quill.update() this.showOptionsContainer = false this.$refs.editor.quill.setSelection(this.content.length, 0) }

arieltoledo avatar Oct 05 '20 12:10 arieltoledo

It work for me setTimeout(() => { this.$refs.input[0].quill.setSelection(this.content.length, 0); }, 0);

DaiND1902 avatar Jan 19 '22 04:01 DaiND1902