Skip to content

ExtensionDevelopment

Christian Ziemski edited this page Mar 7, 2016 · 5 revisions

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?

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:

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.

Source: http://trac.wikidpad2.webfactional.com/wiki/ExtensionDevelopment

Clone this wiki locally