TinyTextareaPlugin
one line description here
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 %MYTEXTAREASTATUS%, %MYTEXTAREA%, %MYRADIOBUTTON% and %MYTEXTAREABUTTON% .
%MYTEXTAREASTATUS{"%URLPARAM{"myedit"}%" formName="%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.
%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.
%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 %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) |
%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
%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>
expands to:
Title of your page
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 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
TinyTextareaPlugin.zip
in your twiki installation directory. Content:
File: |
Description: |
data/TWiki/TinyTextareaPlugin.txt |
Plugin topic |
lib/TWiki/Plugins/TinyTextareaPlugin.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 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 TextFormattingRules topic:
- Set SHORTDESCRIPTION = one line description here
Related Topics: TWikiPlugins,
DeveloperDocumentationCategory,
AdminDocumentationCategory,
TWikiPreferences