DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:menuext

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
plugin:menuext [2022-11-28 18:44] – [Configuration] Possibly misleading revised Michaelsyplugin:menuext [2023-03-02 13:52] (current) annda
Line 7: Line 7:
 type       : action type       : action
 lastupdate : 2021-07-29 lastupdate : 2021-07-29
-compatible : Hogfather+compatible : Hogfather, Igor
 depends    :  depends    : 
 conflicts  conflicts 
Line 76: Line 76:
 | action | A standard action (see [[devel:action_modes]]). Please note that not all actions do have corresponding MenuItems available | | action | A standard action (see [[devel:action_modes]]). Please note that not all actions do have corresponding MenuItems available |
 | classname | Fully qualified class name of a menu item created by a plugin, meaning a class extending ''dokuwiki\Menu\Item\AbstractItem'' | | classname | Fully qualified class name of a menu item created by a plugin, meaning a class extending ''dokuwiki\Menu\Item\AbstractItem'' |
 +
 +===== Javascript =====
 +
 +You can attach Javascript to your items by specifying the function to be called on click:
 +
 +<code>
 +  "attr": {
 +    "onclick": "hello()"
 +  }
 +</code>
 +
 +Remember, you are in global scope, so your method must be available there.
 +
 +
plugin/menuext.txt · Last modified: 2023-03-02 13:52 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