Adding custom buttons to atkFckAttribute
Appearance
|
ATK Howto: Adding custom buttons to atkFckAttribute
|
This howto describes how to add custom buttons to the atkFckAttribute toolbar. When the button is pressed, a popup with a recordlist will be opened. Text from the selected record will be pasted in the WYSIWYG editor.
Custom fck-buttons
The following code needs to be implemented to create a custom button:
Fck Javascript
Create a javascript file fckplugin.js to register the related commands. This file can be placed in the /application_dir/fckplugins/Custom_button directory. Enter the following code:
<javascript>
FCKCommands.RegisterCommand
(
'Custom_button',
new FCKDialogCommand
(
"Custom_button",
"Custom_button",
FCKConfig.PluginsPath "../../../../../dispatch.php?atknodetype=modulename.node</javascript>