ExtensionDevelopment - butscher/WikidPad GitHub Wiki

First, ad-hoc method, not a formal extension: See WikidPad-Menu->Help, Page "InlinePythonEval".

Second method, "real" extensions: Not much formal documentation, but looking at C:\Programme\WikidPad\extensions\autoNew.py (or its "real OS" equivalent :]) will get you going. But put your own extensions into "WikidPad\user_extensions", otherwise they might be lost when you update WikidPad.

FAQ

How can I get help?

  • Search through both WikidPad mailing lists referenced on WikidPad's homepage.
  • DeveloperOverview
  • DeveloperGettingStarted

What else should I know about

ReloadMenuPlugins is helpful for debugging.

Where can I find example code?

For "real" extensions:

  • extensions-directory in WikidPad's install dir

General WikidPad development:

  • ListOfUserScripts
  • WikidPad's source code
  • probably in WikidPad's mailing lists

How can extensions register keybindings?

The function describeMenuItems returns one or more tuples, each tuple describing an entry in "Plugins" menu. The second part of the tuple (menu item string) can contain a shortcut after the actual item text, delimited by a \t. It is enough to enter a shortcut in this way, wxPython handles it then automatically.

Example from "WikidPad\extensions\autoNew.py" (about line 47):

    return ((autoNew, "Create new page\tShift-Ctrl-N", "Create new page"),)

This line is enough to register "Shift-Ctrl-N" as shortcut.

⚠️ **GitHub.com Fallback** ⚠️