All Projects â†’ bevacqua â†’ sell

bevacqua / sell

Licence: MIT license
💰 Cross-browser text input selection made simple

Programming Languages

javascript
184084 projects - #8 most used programming language

Sell

Cross-browser text input selection made simple

Install

npm install sell --save

Usage

Note that el must be either an <input> element or a <textarea>.

sell(el)

Returns an object like { start: 1, end: 3 } indicating where the selection starts and ends.

sell(el, p)

Sets text selection on element el to a range p, like the ones returned from sell(el). Note that you can set either start or end to the special 'end' value, in which case el.value.length will be used.

Related

For general-purpose text selection outside of inputs, see seleccion

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].