Color picker for use in TWiki forms and TWiki applications
Introduction
This module packages the Farbtastic color picker, which is a jQuery plugin developed by Steven Wittens of Acko.net. The package adds a color picker to TWiki forms and TWiki applications.
This will show an HTML input field named "text_color" and a color picker tied to it. The "code" section should be included once per topic, the "picker" section can be included as many times as needed. The size, value and extra parameters are optional. Use the extra parameter to add additional parameters to the HTML input field.
Test: (this works only if the ColorPickerContrib is installed)
Detailed Documentation
This package includes a small Perl module to make it easier to use the
color picker from TWiki plugins. This module includes the functions:
renderForEdit
TWiki::Contrib::ColorPickerContrib::renderForEdit($name, $value, [, \%options]) -> $html
This is the simplest way to use the color picker from a plugin.
$name is the name of the CGI parameter for the calendar (it should be unique),
$value is the color such as '#8899aa' (may be empty)
\%options is an optional hash containing base options for the textfield.
Example:
use TWiki::Contrib::ColorPickerContrib;
my $html = "<form>\n";
$html .= TWiki::Contrib::ColorPickerContrib::renderForEdit( 'webcolor'i, $value );
...
addHEAD
TWiki::Contrib::ColorPickerContrib::addHEAD( )
addHEAD can be called from commonTagsHandler for adding the header to
all pages, or from beforeEditHandler just for edit pages.
Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running.
Like many other TWiki extensions, this module is shipped with a fully
automatic installer script written using the BuildContrib.
If you have TWiki 4.2 or later, you can install from the configure interface (Go to Plugins->Find More Extensions)