Apps and development tools - jQuery Plugins
Textarea Autogrow
The modal plugin provides auto grow function for textareas. The teaxtarea is automatically resized as the user types or removes text.
Includes
Static include:
<tml:include designdb="@afw" ref="include:jquery" o_jquery-plugins="textarea-autogrow"/>
Dynamic Include:
requirejs(["jquery", "jquery-textarea-autogrow"], function(){...})
HTML
<texrarea id="myTa">...</textarea>
Usage
The modal plugin provides auto grow function for textareas.
$("#myTa").autogrow(options)
Parameter "options" is an optional JavaScript object. Valid properties are
- minHeight: the initial height of the textarea. Default is "not set" meaning the line height of text
From OpenWGA 7.5.3 on "options" may also be a String and is interpreted as "command" in this case. Currently the only valid command is
- "update"
to recalculate the textarea size:
$("#myTa").autogrow("update")