DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:event:toolbar_define

This is an old revision of the document!


TOOLBAR_DEFINE

Description:
Add buttons to the toolbar
DefaultAction:
None
Preventable:
yes
Added:
2007-02-27

The event is signalled in toolbar_JSdefines() in inc/toolbar.php before and after the standard toolbar is being filled. You can use this event for adding additional buttons to the toolbar.

Passed Data

$data contains an array of already defined toolbar buttons. Each element of the array may contain keys such as:

  • type — Type of action, see below.

All types use:

  • title — Hover text
  • icon — Image for the button
  • key — The shortcut key is the platform equivalent of ALT, plus this letter

format types use:

  • open — Text to place before cursor/selection
  • close — Text to place after cursor/selection
  • sample — ??

insert types use:

  • insert — Text to insert

mediapopup types use:

  • url — Popup URL
  • name — Popup window name?
  • options — Added to URL?

picker types use:

  • list — function with options
  • icobase — ??

signature types use:

  • No others?

The array is coverted to JSON, and passed to /lib/scripts/edit.js

Plugins handling this event

The following plugins are known to handle this event and their source code may be a good start for understanding and implementing a handler yourself.

See also

devel/event/toolbar_define.1252689623.txt.gz · Last modified: 2009-09-11 19:20 by HåkanS

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki