autosize

Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.

MIT 34 个版本
安装
npm install autosize
yarn add autosize
pnpm add autosize
bun add autosize
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 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.

// 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

版本列表
6.0.1 2023-02-13
6.0.0 2023-02-11
5.0.2 2022-11-20
5.0.1 2021-06-30
5.0.0 2021-05-17
4.0.4 2021-05-17
4.0.3 2021-05-15
4.0.2 2018-05-01
4.0.1 2018-03-23
4.0.0 2017-07-12
3.0.21 2017-05-19
3.0.20 2016-12-04
3.0.19 2016-11-23
3.0.18 2016-10-26
3.0.17 2016-07-25
3.0.16 2016-07-13
3.0.15 2016-01-26
3.0.14 2015-11-11
3.0.13 2015-09-26
3.0.12 2015-09-14
3.0.11 2015-09-14
3.0.10 2015-09-10
3.0.9 2015-09-02
3.0.8 2015-07-08
3.0.7 2015-06-29
3.0.6 2015-05-19
3.0.5 2015-05-18
3.0.4 2015-05-05
3.0.3 2015-04-23
3.0.2 2015-04-23
3.0.1 2015-04-23
3.0.0 2015-04-15
2.0.1 2015-04-14
1.18.13 2014-10-05