caret-pos

Locate the current position of the caret. A plain JavaScript version of Caret.js.

@accursoft/jquery-caret

Manipulate the caret's position in a text box or content-editable element

@react-awesome/use-preserve-input-caret-position

usePreserveInputCaretPosition tracks the input caret position and place it at the correct position so user can have a natural typing experience.