DynamicTextarea 1.0
Purpose: Provides a lightweight plugin for the textarea tag that dynamically resizes based on its content that has no UI glitches or quirks.
MooTools 1.3 only!
Details
- Author
- Amadeus Demarzi
- Current version
- 1.0
- GitHub
- amadeus/DynamicTextarea-Mootools-Class
- Downloads
- 3334
- Category
- Forms
- Tags
- Report
- GitHub Issues
Releases
Dependencies
-
core/1.3:
- Core/Class
- Core/Element
- Core/Element.Event
- Core/Element.Style
- Core/Element.Dimensions
How to use
DynamicTextarea is a reusable class that can by applied to any textarea tag on a page (with any sort of CSS styling attached to it) that allows it to dynamically resize based on the content it contains.
Constructor:
new DynamicTextarea(el,options); //el: A dom node or id string. //options: an object containing key:value pairs for configuring the class. Check the source for more details on available options
In Context:
new DynamicTextarea('myInput',{
minRows:2
});
This will ensure the textarea is always at least 2 rows tall.
Notes
Opera fails with certain CSS styles, so please test Opera and disable if necessary.
Discuss
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus