This TWiki plugin 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 package adds a color
type to TWikiForms:
Type | Description | Size | Value |
---|---|---|---|
color |
Single-line text box and a color picker to pick a color. The color can also be typed into the text box, such as #123456 . |
Text box width in number of characters | Initial (default) color |
Example form definition:
Name: | Type: | Size | Values: | Tooltip message: |
---|---|---|---|---|
Background color | color | 12 | Select color |
You can also use the color picker directly in your HTML forms, without having to write any code. Just include this in the topic text:
<form action="..."> %COLORPICKER{ name="text_color" size="12" value="#123456" class="twikiInputField" }% <form>This will show an HTML input field named "text_color" and a color picker tied to it. The
size
, value
and class
parameters are optional. Additional parameters can be supplied; they will be added to the HTML input field.
Test: (this only works if the ColorPickerPlugin is installed and enabled)
It is also possible to use the color picker in HTML forms with disabled ColorPickerPlugin:
%INCLUDE{ "%SYSTEMWEB%.ColorPickerPlugin" section="code" }% <form action="..."> %INCLUDE{ "%SYSTEMWEB%.ColorPickerPlugin" section="picker" NAME="demo_color" SIZE="12" VALUE="#123456" EXTRA="class=\"twikiInputField\"" }% </form>This will show an HTML input field named "demo_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 NAME
parameter is required; 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 ColorPickerPlugin is installed and disabled)
This package includes a small Perl module to make it easier to use the color picker from other TWiki plugins. This module includes the functions:
TWiki::Plugins::ColorPickerPlugin::addHEAD( )
addHEAD
needs to be called before TWiki::Plugins::ColorPickerPlugin::renderForEdit
is called.
TWiki::Plugins::ColorPickerPlugin::renderForEdit($name, $value, [, \%options]) -> $html
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.
configure
interface (Go to Plugins->Find More Extensions) .zip
or .tgz
archives
perl <module>_installer
)
configure
and enable the module, if it is a plugin.
,v
files in your existing install (take care not to lock the files when you check in)
Author: | TWiki:Main.PeterThoeny![]() ![]() |
||||||
Copyright: | © 2007 Steven Wittens![]() © 2010-2011 TWiki:Main.PeterThoeny ![]() ![]() |
||||||
License: | GPL (GNU General Public License![]() |
||||||
Dependencies: |
|
||||||
Version: | 21489 (2011-08-20) | ||||||
Change History: | |||||||
2011-06-11: | TWikibug:Item6725![]() |
||||||
2010-11-30: | TWikibug:Item6610![]() |
||||||
2010-11-27: | TWikibug:Item6609![]() color form field type defined in this contrib -- TWiki:Main.PeterThoeny![]() |
||||||
2010-11-26: | TWikibug:Item6606![]() ![]() ![]() |
||||||
2006-10-27: | Initial version of ColorPickerContrib by TWiki:Main.FlavioCurti![]() |
||||||
Home: | http://TWiki.org/cgi-bin/view/Plugins/ColorPickerPlugin![]() |
||||||
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/ColorPickerPluginDev![]() |
||||||
Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/ColorPickerPluginAppraisal![]() |
Related Topics: TWikiPreferences, TWikiForms, TWikiPlugins