How to Set the Cursor Position on contentEditable Div with JavaScript? | by John Au-Yeung | Dev Genius
Minko Gechev on Twitter: "Tip: in JavaScript you can an get element by a position relative to the viewport No need for heavy computations trying to match the cursor position to the
![javascript - how to get the caret position of a contenteditable div which contains images - Stack Overflow javascript - how to get the caret position of a contenteditable div which contains images - Stack Overflow](https://i.stack.imgur.com/2SydY.png)