1.0.0 • Published 8 years ago
select-hook v1.0.0
select-hook
virtual-dom hook for setting text selection
Install
$ npm install --save select-hook
Usage
var h = require('virtual-dom/h')
var SelectHook = require('select-hook')
function render (state) {
return h('input', {
select: SelectHook({
start: 0,
end: 10
})
})
}
API
SelectHook([options])
-> object
options
Type: object
Default: {start: 0, end: 0}
An object containing the start and end points of the desired selection.
License
MIT © Ben Drucker
1.0.0
8 years ago