autosize

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

Github星跟蹤圖

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

Browser 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

主要指標

概覽
名稱與所有者jackmoore/autosize
主編程語言JavaScript
編程語言HTML (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2011-11-07 03:21:21
推送於2023-02-15 15:30:24
最后一次提交2023-02-14 06:15:25
發布數86
最新版本名稱6.0.1 (發布於 )
第一版名稱1.15.0 (發布於 2013-01-18 01:22:43)
用户参与
星數5.1k
關注者數118
派生數700
提交數238
已啟用問題?
問題數312
打開的問題數0
拉請求數34
打開的拉請求數0
關閉的拉請求數65
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?