devel:toolbar
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
devel:toolbar [2014-11-30 15:07] – [Dynamic Data] turnermm | devel:toolbar [2016-06-09 22:55] – [...using JavaScript] 24.78.88.211 | ||
---|---|---|---|
Line 20: | Line 20: | ||
| '' | | '' | ||
| '' | | '' | ||
- | | '' | + | | '' |
+ | | '' | ||
+ | | '' | ||
^ '' | ^ '' | ||
| '' | | '' | ||
Line 41: | Line 43: | ||
==== ...using PHP ==== | ==== ...using PHP ==== | ||
- | To extend the toolbar from your plugin you need to write a [[devel: | + | To extend the toolbar from your plugin you need to write a [[devel: |
Create your button structure according to the above information and add it to the received event data.-function in '' | Create your button structure according to the above information and add it to the received event data.-function in '' | ||
Line 57: | Line 59: | ||
* Inserts a toolbar button | * Inserts a toolbar button | ||
*/ | */ | ||
- | function insert_button(& $event, $param) { | + | function insert_button(Doku_Event |
$event-> | $event-> | ||
' | ' | ||
Line 112: | Line 114: | ||
</ | </ | ||
Some notes: | Some notes: | ||
- | * Be aware of the default locations of the images '' | + | * Be aware of the default locations of the images: '' |
* The available options for access keys depends on the [[: | * The available options for access keys depends on the [[: | ||
* More about [[devel: | * More about [[devel: | ||
Line 124: | Line 126: | ||
When adding to the '' | When adding to the '' | ||
- | FIXME What does the below return | + | The returned |
- | + | ||
- | Answered this for myself: | + | |
Line 181: | Line 181: | ||
* There are some [[devel: | * There are some [[devel: | ||
* **Important**: | * **Important**: | ||
+ | |||
+ | |||
+ | === Removing Buttons === | ||
+ | |||
+ | If you want to remove some of the toolbar buttons, you can do so by adding the following code into ''/ | ||
+ | |||
+ | <code javascript / | ||
+ | if (typeof window.toolbar !== ' | ||
+ | var blacklist = ["Bold Text", " | ||
+ | " | ||
+ | " | ||
+ | window.toolbar = window.toolbar.filter(function(elem){ return jQuery.inArray(elem.title, | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | This is from my personal wiki where I removed almost all the buttons. You can figure out what the title of your button is by running the following snippet in a javascript console: | ||
+ | <code javascript> | ||
+ | |||
+ | Then take the string and append it to the ' | ||
+ |
devel/toolbar.txt · Last modified: 2023-08-01 20:08 by annda