JSPM

ractive-select-on-focus

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 214
  • Score
    100M100P100Q89220F
  • License WTFPL

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

Package Exports

  • ractive-select-on-focus

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ractive-select-on-focus) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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