Project

autosize

0.0
No commit activity in last 3 years
No release in over 3 years
Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
 Project Readme

Autosize

This gem bundles the contents of the Autosize Plugin from Jack Moore

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

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'));

See the project page for documentation, caveats, and a demonstration.

Install

add gem 'autosize' to your Gemfile (and then run bundle install).

And in your application.js: //= require autosize

Contributing

  1. Fork it.
  2. Create a branch (git checkout -b my_markup)
  3. Commit your changes (git commit -am "Cool new feature")
  4. Push to the branch (git push origin my_markup)
  5. Open a [Pull Request][1]
  6. Enjoy a refreshing 'Insert Favorite Beverage' and wait