Tags:
create new tag
, view all tags

TinyTextareaPlugin

Edit TWiki form fields in WYSIWYG mode with TinyMCE editor

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: %MYTEXTAREASTATUS{"" formName=""}%

Title of your page

Label Value
Forename %MYTEXTAREA{"Forename" formName="new"}%
%MYTEXTAREABUTTON{formName="new"}%

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 = Edit TWiki form fields in WYSIWYG mode with TinyMCE editor

Plugin Author: TWiki:Main.RuwenReddig
Copyright: © 2012 TWiki:Main.RuwenReddig
2012 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Plugin Version: 2012-04-27 (V1.000)
Change History:
2012-04-27: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.1
CPAN Dependencies: none
Other Dependencies: TinyMCEPlugin
Perl Version: 5.005
TWiki:Plugins.Benchmark: GoodStyle nn%, FormattedSearch nn%, TinyTextareaPlugin 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: TWikiPlugins, DeveloperDocumentationCategory, AdminDocumentationCategory, TWikiPreferences

Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivetgz TinyTextareaPlugin.tgz r2 r1 manage 4.9 K 2012-05-02 - 11:31 JohannesHartig  
Compressed Zip archivezip TinyTextareaPlugin.zip r2 r1 manage 5.8 K 2012-05-02 - 11:31 JohannesHartig  
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2013-10-16 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.