Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

caret-position2

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Issues
File Explorer

Advanced tools

caret-position2

Manage caret/selection on input/textarea. Refactored caret-position.

    1.0.3latest

Version published
Maintainers
1
Yearly downloads
14,272
decreased by-47.02%

Weekly downloads

Readme

Source

caret-position2

Get and set the user's text selection on an input or text area.

$ npm install caret-position2

var get = require('caret-position2/get'); var set = require('caret-position2/set'); // Set caret position after the first character set(input, 1) get(input) // -> { start:1, end:1, caret:1 } // Set text selection to the second and third character set(input, 1, 3) get(input) // -> { start:1, end:3, caret:3 }

NPM

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc