- Plugins are a TW core-supported feature that works "out of the box".
- Plugins are tiddlers that contain ONLY pure javascript code. Any wiki syntax it contains must be wrapped inside a javascript comment block.
- Plugins are tagged with "systemConfig", which tells TW to run them ONCE, when the document is first loaded into the browser.
- Plugins typically install macro definitions or other 'handler functions' that are then triggered later on as a result of other activities.
- Plugins are optional modules extending the functionality of TiddlyWiki.
- Plugins are usually written by third-party developers and released under an open-source license.
- Plugins are usually just a tiddler containing JavaScript code.
Installation
Ideally, plugin tiddlers should be imported from their original location into the TiddlyWiki document.
In order to be processed on startup, plugins need to be assigned the systemConfig Tags.
In general, plugins are processed in alpha-numeric order (by tiddler title), using case-sensitive ASCII sort order (i.e. A-Z precedes a-z).
Dependency Handling
Plugins support the use of a Requires slice to determine load order.
If a plugin contains such a slice, its value is processed as a space-separated, bracketed list of plugin names (i.e. value of the respective Name slice), and any plugins listed there will be loaded first, regardless of the sort order of the titles.
Object detection can be used for strict dependency handling.
Example
If PluginA requires PluginB to be loaded first, it should contain the following directive:
|Requires|PluginB|This will force an override of the normal load sequence and ensure that PluginB is loaded before PluginA is processed.