By convention, plugin titles have the form
$:/plugins/<publisher>/<name>. Plugins that are part of the core TiddlyWiki distribution have titles of the form
Plugins have a
plugin-type field that determines how it is treated. The following values are defined by the core:
plugin- an ordinary plugin
theme- a theme plugin (see ThemeMechanism). Only the theme plugin named in the tiddler $:/theme is activated at any one time (along with any dependent theme plugins)
language- a language plugin (see TranslationMechanism). Only the language plugin named in the tiddler $:/language is activated at any one time (along with any dependent language plugins)
The following plugin types are used internally by the core:
import- for the special $:/Import plugin created while importing is in progress
info- for the special $:/temp/info-plugin tiddler created by the InfoMechanism
While not supported by the plugin library, it is also possible to use custom plugin types to build plugin-like behaviour with a custom user interface. Plugins with a custom type will automatically receive the same behaviour as plain plugins but can display a custom user interface using an appropriate view template segment.
By default, tiddlers within plugins with custom plugin types will not be registered as shadow tiddlers (the constituent tiddlers can still be addressed as subtiddlers by the TranscludeWidget, ViewWidget or the plugintiddlers Operator). Setting a configuration tiddler
yes will cause the tiddlers within the plugin to be registered as shadow tiddlers.
The simplest form of dependency between plugins is that one plugin can declare itself to be a sub-plugin of another plugin by specifying that plugin in the
parent-plugin field. Sub-plugins are displayed in the control panel plugin chooser within the expandable area of their parent plugin. For example, the official plugin library includes the CodeMirror Plugin and also more than a dozen sub-plugins that extend the CodeMirror plugin with optional functionality. Note that sub-plugins cannot themselves have further sub-plugins.
Plugins can also use their
dependents field to list the titles of any other plugins that should also be installed. Note that the list is not resolved recursively: dependents of dependents will not be installed.
When installing a plugin from the plugin library, both the
dependents fields are used to determine any additional plugins to be installed.
Plugins are stored as tiddlers with the following fields:
|author||(optional) Author of plugin|
|dependents||List of dependencies: plugins that should be installed in order for this one to work|
|description||Description of plugin|
|list||Names of exposed plugin information tiddlers (see below)|
|name||Brief name of the plugin|
|plugin-priority||(optional) Numerical priority (higher numbers install later, the core plugin has a priority of zero|
|plugin-type||Generally plugin, language or theme; see PluginMechanism for details|
|parent-plugin||(optional) New in: 5.1.22 Title of the plugin under which this plugin should be displayed as a sub-plugin in the control panel plugin chooser|
|source||(optional) Source URL of plugin|
|text||JSON encoding of the list of tiddlers comprising the plugin|
|title||Title of plugin|
|type||Must be application/json|
|version||(optional) Version string (should conform to SemanticVersioning convention)|