Jump to content

Adding custom buttons to atkFckAttribute

From NusaATK
Revision as of 09:00, 11 April 2007 by Yd5Ng9 (talk | contribs)

ATK Howto: Adding custom buttons to atkFckAttribute

Complexity: Advanced
Author: Jeroen van Sluijs <jeroenvs@ibuildings.nl>

List of other Howto's

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>