![]() ![]() ![]() See the project page for documentation, caveats, and a demonstration. autosize () method on any textarea element. var ta = document. Small jQuery plugin to allow dynamic resizing of textarea height, so that it grows as based on visitor input. This event is fired every time autosize adjusts the textarea height. stroy( document.querySelectorAll( 'textarea')) Removes Autosize and reverts any changes it made to the textarea element. Init var ta = document.querySelector( 'textarea') ![]() There is no efficient way for Autosize to monitor for when another script has changed the textarea value or for changes in layout that impact the textarea element. Autosize will automatically adjust the textarea height on keyboard and window resize events. This was a fun project I started in Aug 2012 as a jQuery plugin. No jQuery dependency either, just plain vanilla JS. mceAutoResize, Auto resizes the editor to the contents. This package contains a TextareaAutoSize ES6 class for vertically adjusting a textarea based on user input and controlling any presentation in CSS. Triggers the height adjustment for an assigned textarea element. The Autoresize plugin provides the following JavaScript command. from a NodeListĪutosize( document.querySelectorAll( 'textarea')) Īutosize( document.querySelector( 'textarea')) 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. Released under the MIT License, source on Github ( changelog)ĭownload Install via NPM npm install autosize ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |