1.0.0 • Published 8 years ago

select-hook v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

select-hook Build Status

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