The Linodef buttons API comes with several theme functions which buttons can use. Currently the following are included:
- List popup
- Autocomplete popup
To use a custom button (e.g. a button the current editor delivers) utilize the function for formatted items.
Usage
The activation of the buttons within your editor support module happens with a JavaScript function:
linodef_buttonsapi_popup($path, $window_width, $window_height)
- string $path
- The path determines wether it is a List popup or a Autocomplete popup.
- int $window_width
- Width of the popup window.
- int $window_height
- Height of the popup window.
To call the List popup use the following path:
$base_url .'/linodef/popup/'. $modulename .'/'. $drupal_element .'/'. $option_string_path
To call the Autocomplete popup use this path:
$base_url .'/linodef/popup-ac/'. $modulename .'/'. $drupal_element .'/'. $option_string_path
- $base_url
- Can be retrieved with global $base_url.
- $modulename
- The name of your editor support module.
- $drupal_element
- The element the button should create a list for, e.g. a certain field name or a content type (see supported element types).
- $option_string_path
- Either 0 or a path compatible list of options. More information about options and how to make options path compatible.