diff options
author | Gabriel Birke <Gabriel.Birke@delti.com> | 2007-08-26 21:22:06 +0200 |
---|---|---|
committer | Gabriel Birke <Gabriel.Birke@delti.com> | 2007-08-26 21:22:06 +0200 |
commit | b7641d9e7bae9b7cf8c64772470e9e2525d18b5c (patch) | |
tree | 71f56073d0c4748bb4441231ce5d51ac61485b2d /inc/plugin.php | |
parent | c818ebe64f8e84f603c77789e7b2a47248d33957 (diff) | |
download | rpg-b7641d9e7bae9b7cf8c64772470e9e2525d18b5c.tar.gz rpg-b7641d9e7bae9b7cf8c64772470e9e2525d18b5c.tar.bz2 |
Arbitrary Button types in JS toolbar
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
Diffstat (limited to 'inc/plugin.php')
0 files changed, 0 insertions, 0 deletions