---+!! !TinyTextareaPlugin <!-- Contributions to this plugin are appreciated. Please update the plugin page at http://twiki.org/cgi-bin/view/Plugins/TinyTextareaPlugin or provide feedback at http://twiki.org/cgi-bin/view/Plugins/TinyTextareaPluginDev. If you are a TWiki contributor please update the plugin in the SVN repository. --> <sticky><div style="float:right; background-color:#EBEEF0; margin:0 0 20px 20px; padding: 0 10px 0 10px;"> %TOC{title="Page contents"}% </div></sticky> %SHORTDESCRIPTION% ---++ Introduction This plugin enables simple loading and editing of FORMFIELDs via HTML textareas enriched by some functionalties of TinyMCEPlugin. Input will be stored in corresponding FORMFIELDs. These fields must exist in the topic whenever TinyTextareaPlugin is used. ---++ Syntax Rules The Plugin provides four variables %<nop>MYTEXTAREASTATUS%, %<nop>MYTEXTAREA%, %<nop>MYRADIOBUTTON% and %<nop>MYTEXTAREABUTTON% . =%<nop>MYTEXTAREASTATUS{"%<nop>URLPARAM{"myedit"}%" formName="%<nop>URLPARAM{"formName"}%"}%= This variable recognize if the topic is in edit mode or not and which html-form is in edit mode. Put this variable once per topic before any other of this plugin. =%<nop>MYTEXTAREA{"..."}%= Use this variable wherever you want to show text stored in FORMFIELDs editable by the plugin. | *Parameter* | *Explanation* | *Default* | | ="formfield"= | Name of the FORMFIELD where content is stored. *required* | (none) | | =formName="..."= | Name of the Html-Form where this field belongs to. *required* | (none) | | =rows="..."= | Expect an integer how many rows the textarea should have. *optional* | =2= | | =cols="..."= | Expect an integer how many cols the textarea should have. | =67= | *Note:* Internet Explorer Version 7 and 8 handles the =rows= and =cols= parameters not correctly. =%<nop>MYRADIOBUTTON{"..."}%= Use this variable if the referenced FORMFIELD contains radio buttons instead of text. For each choice of the RadioButton you have to add a new %<nop>MYRADIOBUTTON{"..."}% variable | *Parameter* | *Explanation* | *Default* | | ="formfield"= | Name of the FORMFIELD where content is stored. *required* | (none) | | =formName="..."= | Name of the Html-Form where this field belongs to. *required* | (none) | | =value="..."= | Name of the Option in the belonging FormField. *required* | (none) | | =visiblevalue="..."= | Shown label of the Option. *required* | (none) | =%<nop>MYTEXTAREABUTTON%= Use this variable to create an 'Edit' Button. While in edit mode a 'Save' and 'Cancel' Button is shown instead. | *Parameter* | *Explanation* | *Default* | | =formName="..."= | Name of the Html-Form where the buttons belong to. *required* | (none) | | =edit="..."= | Label for the edit button. *optional* | =Edit= | | =save="..."= |Label for the save button. *optional* | =Save= | | =cancel="..."= | Label for the cancel button. *optional* | =Cancel= | ---++ Examples =<verbatim>%MYTEXTAREASTATUS{"%URLPARAM{"myedit"}%" formName="%URLPARAM{"formName"}%"}% ---+++ Title of your page <form name="new" action="%SCRIPTURLPATH{save}%/%WEB%/" method="post"> | *Label* | *Value* | | *Forename* | %MYTEXTAREA{"Forename" formName="new"}% | %MYTEXTAREABUTTON{formName="new"}% </form> </div></verbatim>= expands to: %MYTEXTAREASTATUS{"%URLPARAM{"myedit"}%" formName="%URLPARAM{"formName"}%"}% ---+++ Title of your page <form name="new" action="%SCRIPTURLPATH{save}%/%WEB%/" method="post"> | *Label* | *Value* | | *Forename* | %MYTEXTAREA{"Forename" formName="new"}% | %MYTEXTAREABUTTON{formName="new"}% </form> </div> *Note:* Your input will not be stored, because of the missing FORMFIELD "Forename". ---++ Plugin Installation & Configuration __Note:__ You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server. * For an __automated installation__, run the [[%SCRIPTURL{configure}%][configure]] script and follow "Find More Extensions" in the in the __Extensions__ section. * Or, follow these __manual installation__ steps: * Download the ZIP file from the Plugins home (see below). * Unzip ==%TOPIC%.zip== in your twiki installation directory. Content: | *File:* | *Description:* | | ==data/TWiki/%TOPIC%.txt== | Plugin topic | | ==lib/TWiki/Plugins/%TOPIC%.pm== | Plugin Perl module | * * Set the ownership of the extracted directories and files to the webserver user. * Install the dependencies (if any). * Plugin __configuration and testing__: * Run the [[%SCRIPTURL{configure}%][configure]] script and enable the plugin in the __Plugins__ section. * Configure additional plugin settings in the __Extensions__ section if needed. * Test if the installation was successful: See example above. ---++ Plugin Info * One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic: * Set SHORTDESCRIPTION = one line description here | Plugin Author: | TWiki:Main.RuwenReddig | | Copyright: | © 2012 TWiki:Main.RuwenReddig <br /> © 2012 TWiki:TWiki.TWikiContributor | | License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) | | Plugin Version: | 2012-04-27 (V1.000) | | Change History: | <!-- versions below in reverse order --> | | 2012-04-27: | Initial version | | TWiki Dependency: | $TWiki::Plugins::VERSION 1.1 | | CPAN Dependencies: | none | | Other Dependencies: | none | | Perl Version: | 5.005 | | TWiki:Plugins.Benchmark: | %SYSTEMWEB%.GoodStyle nn%, %SYSTEMWEB%.FormattedSearch nn%, %TOPIC% nn% | | Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/TinyTextareaPlugin | | Feedback: | http://TWiki.org/cgi-bin/view/Plugins/TinyTextareaPluginDev | | Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/TinyTextareaPluginAppraisal | __Related Topics:__ %SYSTEMWEB%.TWikiPlugins, %SYSTEMWEB%.DeveloperDocumentationCategory, %SYSTEMWEB%.AdminDocumentationCategory, %SYSTEMWEB%.TWikiPreferences
This topic: TWiki
>
TinyTextareaPlugin
Topic revision: r1 - 2012-05-02 - TWikiGuest
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at TWiki:TWiki.TinyTextareaPlugin