Toolbar Customization
(Revised: 03/08/2003)
The FCKeditor toolbar can be easily customized. You can easily define what
toolbar options are available and even create your custom actions. All you have
to do is configure the fck_config.js file toolbar sets.
Configuration File
The file js/fck_config.js holds all configurations and user
customizations for the editor. Here you can define all available toolbar sets
and its definitions. Use the “ToolbarSets ” configuration
option to do that.
A toolbar set is a group of toolbar items that can be used by a FCKeditor
instance. The editor package comes with 3 sample toolbar sets: Default,
Accessibility and Basic. You can modify or add as many toolbar sets as you
want.
Let’s take a look at the “ToolbarSets” configuration option:
config.ToolbarSets["ToolBarSetName"] = [ // Toolbar Name ['Item 1','Item 2','-','Item 3','Item n'], // 1st Band ['Item 4','-','Item 5','Item 6','Item n'] // 2nd Band ] ;As you can see you can add as many toolbar bands as you want. Use a minus (-) to create a separator.
Cut | Bold | Undo | ||
Copy | Italic | Redo | ||
Paste | Underline | InsertOrderedList | ||
SelectAll | StrikeThrough | InsertUnorderedList | ||
RemoveFormat | Subscript | FontStyle | ||
Link | Superscript | FontFormat | ||
Unlink | JustifyLeft | Font | ||
Image | JustifyCenter | FontSize | ||
Table | JustifyRight | TextColor | ||
Rule | JustifyFull | BGColor | ||
SpecialChar | Outdent | EditSource | ||
About | Indent |
CreateFCKEditor(instanceName, width, height, toolbarSetName, initialValue) ;This is a sample that uses “MyToolbar” as the toolbar set to be loaded:
<SCRIPT language="javascript"> <!-- CreateFCKEditor('MyEditor','100%',150,'MyToolbar','This is a <B>sample</B>.') ; --> </SCRIPT>If toolbarSetName is null, the "Default" toolbar set is loaded.