====== TOOLBAR_DEFINE ====== ---- dataentry event ---- Description: Add buttons to the toolbar DefaultAction: None Preventable: yes Added_dt: 2007-02-27 ---- The event is signalled in [[xref>toolbar_JSdefines()]] in [[xref>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 converted to JSON, and passed to ''/lib/scripts/edit.js'' ===== See also ===== * [[codesearch>TOOLBAR_DEFINE|Code related to this event]] used in any DokuWiki's files, plugins and templates * [[devel:Action Plugins]] * [[devel:Events]] * [[devel:Toolbar]]