rah_autogrowing_textarea
Published under current TXP projects
Auto-growing textareas to Textpattern’s backend. With the plugin, all backend textareas can be adjusted to automatically grow along the content. While you type, the textarea will follow and resize, depending on the amount of the content and lines. The plugin also includes simple admin panel under Extensions tab, where you can set which textareas will grow, plus set some additional growing preferences.
Image: rah_autogrowing_textarea
Intro and description
An admin-side plugin that brings auto-growing textareas to Textpattern’s backend. Fields will automatically resize while typing, depending on the amount of content. Uses the jQuery plugin Auto-grown Textarea by Chrys Bader.
List of features
- Simple setup: just run the automatic plugin setup and activate.
- Automatically growing textareas to Textpattern’s backend.
- Outputs valid XHTML, and tiny and clean JavaScript code.
- A simple admin interface under Extensions for setting styles and preferences.
Requirements
rah_autogrowing_textarea’s minimum requirements:
- Textpattern 4.4.1+
- Textpattern with jQuery version 1.2.2+
- Client browser should be modern and, also, should be supported by jQuery.
Installation and usage
The general simple behavior stands: paste plugin code to the plugin installer textarea and run the automatic setup. Then just activate the plugin and it’s ready, textareas are auto-growing.
Under Extensions tab you will find a subpage called Autogrowing Textareas where you can set all sort of settings and create a so called textarea callbacks which will basically hook the auto-growing function to the specific textarea.
Defining (and hooking) the textarea is done by choosing the backend page where the textarea exists and the XHTML ID (for example body, excerpt etc.) which is defined for the textarea. The auto-grown textarea can either be plugin’s or Textpattern’s core textarea. Any valid textarea with ID (located under valid event -get callback) can be made to auto-grow.
Changelog
Version 0.6
- Added: CSRF (session riding) protection using Textpattern’s new core functions introduced in v4.4.1.
- Fixed: only adds default definition rows to the database when plugin hasn’t been installed before, or when the old installed version was v0.4 or older.
- Changed: set temporary version number after installer has been run. Prevents possibility of running the installer twice.
- Now requires Textpattern version 4.4.1 or newer.
Version 0.5
- Added: now includes uninstaller that uses plugin-lifecycle callbacks, drops the plugin’s tables from the database when deleting the plugin.
- Added: informs the user if updating database records failed.
- Added: language string support. Now the interface can be translated to different languages using TextPacks.
- Added: “Options” link to the Plugins pane.
- Added: rah_ui class selectors to the elements,
<tbody>and<thead>containers to the list table. - Changed: Improved JavaScript based multi-edit script.
- Changed: During first install, set the database table’s default charset to UTF-8.
- Changed: Only accept POSTs when saving changes. Requests send as GET are ignored.
- Changed: shortened the admin-side step names, and renamed step form to edit.
- Removed: replaced
rah_autogrowing_textarea_check()function with new method of checking if the plugin is up-to-date. Now uses simple version number to confirm the status. - Removed: Some markup, left-over inline styles and pane heading.
- Now requires Textpattern version 4.2.0 or newer for full feature support.
Version 0.4
- Added: now prompts users if required fields are left empty when creating new rules.
- Interface improvements: removed unnecessary table-layouts, moved all CSS lines to
<head>. - Changed: plugin type to the newer Admin only.
- Changed: tries to run the installer only if there are no preferences available.
- Changed: now uses different method for building list of available events.
- Changed: shows events/panels label instead of name in the listings.
- Changed: preferences pane shows multiedit controls only when something is selected. As seen in rah_post_versions.
- Removed default values from the installer SQL.
Version 0.3.3
- Removed useless queries.
- Improved callbacks.
Version 0.3.2
- Fixed: Removed lost child skeleton function; Fixes error:
Fatal error: Call to undefined function rah_plugin_download_install().
Version 0.3
- Added: Admin interface under Extensions -tab.
- Added: Able to define which textareas auto-grow.
- Added: Max. height limit, line height and other optional style settings are now adjustable.
Version 0.2
- Changed
line-heightfrom EMs to pixels: fixes the small-to-smaller-by-line-to-lineline-height-bug that occurs in some browsers that cause some problems with textareas.
Version 0.1
- First release.