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 autosize
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.
autosize(document.querySelectorAll('textarea'));
autosize(document.querySelector('textarea'));
autosize($('textarea'));
Released under the MIT License