[Plugin] Texarea Auto Expander

A place to share your Plugins and Extensions

[Plugin] Texarea Auto Expander

Postby raymond » Wed Feb 03, 2010 1:50 am

Hello,

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:
textarea.zip
Textarea Auto Expander Plugin
(2.54 KiB) Downloaded 246 times


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
raymond
Site Admin
 
Posts: 215
Joined: Tue Mar 17, 2009 5:04 am

Re: [Plugin] Texarea Auto Expander

Postby mattc » Wed Feb 03, 2010 6:03 pm

thanks i'll take a look at it
mattc
 
Posts: 10
Joined: Sun Nov 15, 2009 5:21 pm

Re: [Plugin] Texarea Auto Expander

Postby orson4music » Sun Jul 11, 2010 4:17 pm

Nice plugin. Works great.
orson4music
 
Posts: 20
Joined: Sun Jun 13, 2010 11:40 am


Return to Plugins & Widgets

Who is online

Users browsing this forum: No registered users and 1 guest

cron