We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Current code will fallback to this.quill.getLength() when you move your cursor to the beginning of content.
this.quill.getLength()
insert(dataUrl) { const index = (this.quill.getSelection() || {}).index || this.quill.getLength(); this.quill.insertEmbed(index, 'image', dataUrl, 'user'); }
Check the result of getSelection may be a better solution.
getSelection
insert(dataUrl) { const selection = this.quill.getSelection(); const index = selection ? selection.index : this.quill.getLength(); this.quill.insertEmbed(index, 'image', dataUrl, 'user'); }
The text was updated successfully, but these errors were encountered:
@caasi Good job, You should give a PR to this project.
Sorry, something went wrong.
No branches or pull requests
Current code will fallback to
this.quill.getLength()
when you move your cursor to the beginning of content.Check the result of
getSelection
may be a better solution.The text was updated successfully, but these errors were encountered: