diff --git a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid b/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid index 5b1a4ef27..a2505a188 100644 --- a/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid +++ b/editions/tw5.com/tiddlers/mechanisms/PluginMechanism.tid @@ -1,27 +1,36 @@ created: 20130826122000000 -modified: 20161015122959346 +modified: 20190927172137277 tags: Mechanisms title: PluginMechanism type: text/vnd.tiddlywiki ! Introduction -[[Plugins]] are bundles of tiddlers that are distributed and managed as a single unit by being packed into a single JSON tiddler. Users can install them with drag and drop, or using the [[plugin library|Installing a plugin from the plugin library]]. +[[Plugins]] are bundles of tiddlers that are distributed and managed as a single unit. Users can install them with drag and drop, or using the [[plugin library|Installing a plugin from the plugin library]]. -The tiddlers within registered plugins behave as ShadowTiddlers: they can be freely overwritten by creating a tiddler with the same title, but deleting that tiddler restores the underlying tiddler value from the plugin. +<<.from-version "5.1.22">> Plugins that contain JavaScript modules require a reload of the wiki before they will work. Plugins that do not contain JavaScript modules are automatically dynamically loaded and unloaded. -Plugins have a `plugin-type` field that may take the following values: +Plugins can be used to package any tiddler content, including JavaScript [[modules|Modules]] that extend and enhance the core TiddlyWiki5 functionality. The tiddlers within registered plugins are ShadowTiddlers: they can be freely overwritten by creating a tiddler with the same title, but deleting that tiddler restores the underlying tiddler value from the plugin. -* `plugin` //(default)// - a plain plugin -* `theme` - a theme plugin (see ThemeMechanism) -* `language` - for translations only - -Plugins can be used to package ordinary content, or can include JavaScript [[modules|Modules]] that extend and enhance the core TiddlyWiki5 functionality. - -Plugins conventionally have a title of the form `$:/plugins/publisher/name`. Plugins that are part of the core TiddlyWiki distribution have titles of the form `$:/plugins/tiddlywiki/name`. +By convention, plugin titles have the form `$:/plugins//`. Plugins that are part of the core TiddlyWiki distribution have titles of the form `$:/plugins/tiddlywiki/`. When [[running TiddlyWiki under Node.js|TiddlyWiki on Node.js]], plugins can also be stored as individual tiddler files in [[PluginFolders]]. +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 + +Custom plugin types can also be used. They will automatically receive the same behaviour as plain plugins but can display a custom user interface using an appropriate [[view template segment|SystemTag: $:/tags/ViewTemplate]]. + +See [[Plugin Fields]] for details of the other fields used by plugins. + ! More information <> diff --git a/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid b/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid index 6edc5ad13..d4e2fef3b 100644 --- a/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid +++ b/editions/tw5.com/tiddlers/plugins/Installing a plugin from the plugin library.tid @@ -1,5 +1,5 @@ created: 20160107222352710 -modified: 20160720145836265 +modified: 20190927205622498 tags: Plugins title: Installing a plugin from the plugin library type: text/vnd.tiddlywiki @@ -17,7 +17,8 @@ Follow these instructions when using TiddlyWiki as a standalone HTML file: ## Use the ''search'' box to search the plugin details # Click the ''install'' button to install a plugin # Save your TiddlyWiki {{$:/core/images/save-button}} -# ''Refresh the page so that TiddlyWiki loads the new plugin'' {{$:/core/images/refresh-button}} +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin {{$:/core/images/refresh-button}} +#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details # The plugin should now be available for use ! Client-Server Configuration diff --git a/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid b/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid index 6b52fe33c..426615b3c 100644 --- a/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid +++ b/editions/tw5.com/tiddlers/plugins/Manually installing a plugin.tid @@ -1,5 +1,5 @@ created: 20160107222430613 -modified: 20160617104949358 +modified: 20190927205631648 tags: Plugins title: Manually installing a plugin type: text/vnd.tiddlywiki @@ -9,5 +9,6 @@ type: text/vnd.tiddlywiki # In another browser window, find a link to the plugin, e.g. [[$:/plugins/tiddlywiki/example]]. You will typically find these links on the home page of the plugin (for example, https://tiddlywiki.com/plugins/tiddlywiki/katex/) # Drag the link [[$:/plugins/tiddlywiki/example]] to the browser window containing your TiddlyWiki # Save your TiddlyWiki ({{$:/core/images/save-button}}) -# ''Refresh the page so that TiddlyWiki loads the new plugin'' ({{$:/core/images/refresh-button}}) +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completes installation of the plugin {{$:/core/images/refresh-button}} +#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details # The plugin should now be available for use \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/plugins/PluginFolders.tid b/editions/tw5.com/tiddlers/plugins/PluginFolders.tid index d842affc1..393f1ef40 100644 --- a/editions/tw5.com/tiddlers/plugins/PluginFolders.tid +++ b/editions/tw5.com/tiddlers/plugins/PluginFolders.tid @@ -1,5 +1,5 @@ created: 20161015113519246 -modified: 20161015113833256 +modified: 20190927172743140 tags: PluginMechanism title: PluginFolders type: text/vnd.tiddlywiki @@ -13,6 +13,7 @@ The JSON structure for plugin tiddlers is as follows: ``` { "title": "$:/plugins/publisher/name", + "name": "name", "description": "An exemplary plugin for demonstration purposes", "author": "JeremyRuston", "version": "1.2.3-alpha3", diff --git a/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid b/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid index 86636179e..f4d7e6d0a 100644 --- a/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid +++ b/editions/tw5.com/tiddlers/plugins/Plugin_Fields.tid @@ -1,5 +1,5 @@ created: 20161015122718559 -modified: 20161015122719647 +modified: 20190927172655698 tags: PluginMechanism title: Plugin Fields type: text/vnd.tiddlywiki @@ -9,14 +9,15 @@ type: text/vnd.tiddlywiki Plugins are stored as tiddlers with the following fields: |!Field |!Description | -|title |Title of plugin | +|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 | -|author |Author of plugin | -|version |Version string (must conform to [ext[SemanticVersioning|http://semver.org/]] convention) | -|source |Source URL of plugin | -|type |Must be ''application/json'' | -|plugin-type |Can be ''plugin'' (default), ''language'' or ''theme'' | -|text |JSON encoding of the list of tiddlers comprising the plugin | |list |Names of exposed plugin information tiddlers (see below) | -|name |Name of the theme (only for themes) | -|dependents |List of dependent plugins (currently only implemented for themes) | \ No newline at end of file +|name |Brief name of the plugin | +|plugin-type |Generally ''plugin'', ''language'' or ''theme''; see PluginMechanism for details | +|parent-plugin |//(optional)// <<.from-version "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 [ext[SemanticVersioning|http://semver.org/]] convention) | \ No newline at end of file diff --git a/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid b/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid index f2b0e633e..096183bfb 100644 --- a/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid +++ b/editions/tw5.com/tiddlers/plugins/Uninstalling a plugin.tid @@ -1,5 +1,5 @@ created: 20160107222504269 -modified: 20160720145839711 +modified: 20190927205509760 tags: Plugins title: Uninstalling a plugin type: text/vnd.tiddlywiki @@ -9,12 +9,14 @@ type: text/vnd.tiddlywiki Follow these instructions when using TiddlyWiki as a standalone HTML file: # Create a backup of your current TiddlyWiki HTML file ([[just in case|The First Rule of Using TiddlyWiki]]) -# Open the [[control panel|$:/ControlPanel]] {{$:/core/images/options-button}} and go to the ''Plugins'' tab -# Click on the plugin you want to delete to open its tiddler +# Open the [[control panel|$:/ControlPanel]] and go to the ''Plugins'' tab +# Click on the plugin you want to delete to open it as a standalone tiddler # Click the {{$:/core/images/down-arrow}} ''more'' button and {{$:/core/images/delete-button}} ''delete'' the tiddler # Save your TiddlyWiki {{$:/core/images/save-button}} -# ''Refresh the window so that TiddlyWiki completely removes the plugin'' {{$:/core/images/refresh-button}} -# The plugin should now be deleted +# If a yellow warning bar appears at the top of the window, refresh the window so that TiddlyWiki completely removes the plugin {{$:/core/images/refresh-button}} +#* <<.from-version "5.1.22">> It is no longer necessary to refresh TiddlyWiki when deleting plugins that support dynamic loading. See PluginMechanism for more details +# The plugin should no longer be active or available + ! Client-Server Configuration