Expandable Input – A jQuery plugin
A jQuery plugin to use <{span|div|...} contenteditable> as expandable inputs.
Download / Installation
You can download the latest JS & CSS code here:
- https://unpkg.com/expandable-input/dist/expandable-input.js
- https://unpkg.com/expandable-input/dist/expandable-input.css
Or install via npm
npm install --save expandable-input
The JS code can be required with
var jQuery = var expandableInput = // init
The CSS code lives at node_modules/expandable-input/expandable-input.css
Usage
<!-- load jquery --> <!-- load expandable-input assets --> <!-- The behaviour is initialized on first interaction --> Author: |
To listen to changes on the inputs
Notes
$.fn.val()
&$.fn.select()
are being patched to work with thecontenteditable
inputsdisplay: inline
is currently not supported. It gets set to inline-block when initialized.- no html5 validation or password=type etc is not supported.
Local Setup
git clone git@github.com:gr2m/smartdate-input.gitcd smartdate-inputnpm install
Test
You can start a local dev server with
npm start
Run tests with
npm test
While working on the tests, you can start Selenium / Chrome driver once, and then tests re-run on each save
npm run test:mocha:watch
Fine Print
The Expandable Input Plugin have been authored by Gregor Martynus, proud member of the Hoodie Community.
License: MIT