I've put together a little plugin/extension based on Mattc's request.
This extension will make it possible to auto-expand a Textarea when the user is typing. To do this you only need to include the textarea.expander.php file and call the textAreaExpander() method on the selected element:
- Code: Select all
<?php
include_once 'expander/textarea.expander.php';
class NewPage extends RaxanWebPage {
protected $preserveFormContent = true;
protected function _load($e) {
// enable expander and set min height to 50 pixels
// for the txtMessage textarea element
$this->txtMessage->textAreaExpander(50);
}
}
?>
To download the full example click on the textarea.zip link below:
PS. You will have to download and install Raxan for PHP on your web server in order for the above example to work.
This plugin makes use of the TextArea Auto-Expander JavaScript library from SitePoint