A Ractive decorator that selects the contents of an input when it gains focus
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
index.js
package.json
readme.md

readme.md

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" as-selectOnFocus value="{{shareUrl}}" readonly>

License

WTFPL