vanilla-caret-js
Set and get Caret position (contenteditable or TextArea) using Vanilla JavaScript
Set and get Caret position (contenteditable or TextArea) using Vanilla JavaScript
micro lib for control caret
usePreserveInputCaretPosition tracks the input caret position and place it at the correct position so user can have a natural typing experience.