ractive-select-on-focus

A Ractive decorator that selects the contents of an input when it gains focus

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
ractive-select-on-focus
001.1.06 years ago7 years agoMinified + gzip package size for ractive-select-on-focus in KB

Readme

Decorate the elements in your Ractive template so that the text inside them gets selected when they gain focus.

Install

npm install ractive-select-on-focus

Usage

In your code:
Ractive.decorators.selectOnFocus = require('ractive-select-on-focus')

In your template:
<input type="text" decorator="selectOnFocus" value="{{shareUrl}}" readonly>

License

WTFPL