AtkFckAttribute
Appearance
Description
The atkFckAttribute is a 'wysiwyg' text editor. It is a wrapper for the FckEditor from http://www.fckeditor.net. It is feature-rich and works in most popular browsers.
Params
The constructor of the atkFckAttribute has the following params:
atkFckAttribute($name, $size='', $flags=0,$opt=array())
- name String
Name of the attribute (the same as the fieldname used in the database)
- size int
Can be an array with cols and rows key for size and an autoadjust value or just the rows size
- flags (optional) int
Flags for the attribute. For more information about flags, please checkout the flags section.
- opt array
Extra fckeditor configuration options.
Examples
(in a node constructor):
$attr = &$this->add(new atkFckAttribute("forum_reply_text"));
Adds a WYSIWYG field 'forum_reply_text' to the node.
Toolbar
$attr->setToolbarSet('Basic');
With setToolbarSet it is possible to select the icons displayed on the toolbar. The 'Basic' set includes buttons for 'Bold','Italic','OrderedList','UnorderedList','Link','Unlink','About'.
A custom set can be specified in atk\attributes\fck\fckconfig.js.
Custom buttons
It is also possible to add custom buttons to the toolbar.