Create a gist now

Instantly share code, notes, and snippets.

Embed
Insert text pointer at expected location after injecting an element into contenteditable via external UI
dom.focus()
const range = document.createRange()
range.setStart(selection.anchorNode.nextSibling.nextSibling, 0)
range.collapse(true)
selection.removeAllRanges()
selection.addRange(range)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment