Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Transforms.insertNodes(editor, [emojiNode, {
text: ' '
}])
Transforms.move(editor, { distance: 2 })
} else {
// Set focus point from blurred
editor.selection = { anchor: editorFocusPoint, focus: editorFocusPoint }
const emojiNode = {
type: 'emoji',
value: emoji.colons,
children: [{ text: '' }],
}
Transforms.insertNodes(editor, emojiNode)
Transforms.move(editor, { distance: 1 })
ReactEditor.focus(editor)
setShowEmojiKeyboard(false)
}
}