Package Exports
- autosize
- autosize/dist/autosize.js
- autosize/src/autosize
- autosize/src/autosize.js
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 (autosize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Summary
Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.
Demo
Full documentation and a demo can be found at jacklmoore.com/autosize
Install via NPM
npm install autosizeInstall via Bower
bower install autosizeBrowser compatibility
| Chrome | Firefox | IE | Safari | iOS Safari | Android | Opera Mini | Windows Phone IE |
|---|---|---|---|---|---|---|---|
| yes | yes | 9 | yes | yes | 4 | ? | 8.1 |
Usage
The autosize function accepts a single textarea element, or an array or array-like object (such as a NodeList or jQuery collection) of textarea elements.
// from a NodeList
autosize(document.querySelectorAll('textarea'));
// from a single Node
autosize(document.querySelector('textarea'));
// from a jQuery collection
autosize($('textarea'));Released under the MIT License