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
I'm trying to insert emoji into Quiil editor, but there is a error:
Failed to execute 'setStart' on 'Range': The offset 4294967295 is larger than the node's length (1).
Current code: onSelectEmoji(emoji) { if (this.editor) { const selection = this.editor.getSelection(); if (selection) { const lastIndex = selection.index || 0; const contentLength = this.editor.getLength(); console.log(contentLength); if (lastIndex >= 0 && lastIndex <= contentLength) { this.editor.insertText(lastIndex, emoji.i); this.editor.setSelection(lastIndex + emoji.u.length); } } this.toggleDialogEmoji(); } },
The text was updated successfully, but these errors were encountered:
resolved?
Sorry, something went wrong.
No branches or pull requests
I'm trying to insert emoji into Quiil editor, but there is a error:
Failed to execute 'setStart' on 'Range': The offset 4294967295 is larger than the node's length (1).
Current code:
onSelectEmoji(emoji) {
if (this.editor) {
const selection = this.editor.getSelection();
if (selection) {
const lastIndex = selection.index || 0;
const contentLength = this.editor.getLength();
console.log(contentLength);
if (lastIndex >= 0 && lastIndex <= contentLength) {
this.editor.insertText(lastIndex, emoji.i);
this.editor.setSelection(lastIndex + emoji.u.length);
}
}
this.toggleDialogEmoji();
}
},
The text was updated successfully, but these errors were encountered: