DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:toolbar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
devel:toolbar [2019-04-21 03:47] Dr-Yukondevel:toolbar [2023-08-01 20:08] (current) annda
Line 115: Line 115:
 } }
 </code> </code>
 +
 +You can register a simple global onclick function for your button by sticking to the naming convention ''tb_<yourButtonType>''. Here is an example for the ''insert'' type from [[xref>lib/scripts/toolbar.js]]
 +
 +<code javascript>
 +function tb_insert(btn, props, edid) {
 +    insertAtCarret(edid,fixtxt(props.insert));
 +    pickerClose();
 +    return false;
 +}
 +</code>
 +
 Some notes: Some notes:
   * Be aware of the default locations of the images: ''lib/images/toolbar/'' and ''lib/images/''   * Be aware of the default locations of the images: ''lib/images/toolbar/'' and ''lib/images/''
devel/toolbar.txt · Last modified: 2023-08-01 20:08 by annda

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