Skip to content
Snippets Groups Projects
user avatar
Gabriel Birke authored
This is my patch for creating toolbar buttons with arbitrary button types,
tested with Firefox, Opera and IE7. If you want to create a new type of
button, you must have a function in the script.js file of your plugin. The
function name must begin with "addBtnAction", followed by the type name, for
example for the type "myType" the function must be called
"addBtnActionMyType" (bear in mind that the first char of the type must be
uppercased in the function name).

The function has four parameters:
"btn" is the HTML element for the button where you attach the onclick
handler
"props" is an associative array of the array properties that come from the
toolbar array that was created by toolbar.php
"edid" (optional) is the id of the editor textarea
"id" (optional) is a "unique" number for each button: the index variable of
the for loop where the buttons get created.

darcs-hash:20070826192206-79ce3-1fe6f49c1eb5d0c10adbadc43f7b2ee1aec1853e.gz
b7641d9e
History
Name Last commit Last update