Author: Matías Montes (montesmatias-at-gmail.com)
This custom input lets the user create or edit html content using the popular FCKEditor interface
This is a plugin to the main forms class, so the main class is obviously required. You can download it at PHPClasses
FCKEditor software
You need to download the FCKEditor software at http://www.fckeditor.net/download/ and specify the installation path when adding the input.
Page Head
When using the ONCOMPLETE event, the input creates javascript code to handle it, which should be added to the page head using the main form class PageHead function.
In-Code documentation
The code lacks documentation in which I'll work for the next release
Validation
There is currently no validation for the input. I'm planning on defining minimum/maximum length and word count validations and XML validation but haven't come up with some more useful validations. Suggestions are appreciated.
Missing properties
The following properties are not yet supported but are intended to be
BasePath (required)
The path to where the FCKEditor files are located. It should contain the whole http path to the folder starting after the domain name
Example Value:
If your files are located at http://www.mysite.com/fckeditor/use_this_files/
BasePath value should be: "/fckeditor/use_this_files/"
Notice the starting and trailing slashes ("/")
Default Value: not set
Config
An associative array that takes pairs of configuration parameters and their respective values
Read the FCKEditor documentation for a list of the posible configuration parameters
Note: If you set the SkinPath config using this argument, it will override the skin set using the Skin argument. Config is considered fore more advanced users, Skin is an easy alternative for the regular users as it automaticaly calculates the path
Default Value: Not Set
FCKSource
A boolean value to force FCKEditor to load the _source files.
Read the FCKEditor documentation for further explanation
Default Value: 0
HEIGHT (changeable)
An integer or percentual value that defines the height of the editor
Example Values: 200 "20%"
Default Value: 200
ONCOMPLETE
String of Javascript code to be executed when the editor finishes loading
Default Value: ""
Skin
Name of the folder with the preferred skin.
Is used to automatically generate the SkinPath config key
Default Value: not set
ToolbarSet
A string with the name of the Toolbar Set to use
Default Value: "Default"
VALUE
The HTML code to be edited
Default Value: ""
WIDTH (changeable)
An integer or percentual value that defines the width of the editor
Example Values: 200 "20%"
Default Value: "100%"
Accessible (changeable)
The same as the Accessible property for basic inputs.
Note: The editor might break when using the main class ReadOnly attribute and the input Accessible attribute set to 1.
Default Value: 1
PlainText
All HTML tags will be stripped when input values are loaded.
Default Value: 0