diff --git a/editions/tw5.com/tiddlers/howtos/How to create plugins in the browser.tid b/editions/tw5.com/tiddlers/howtos/How to create plugins in the browser.tid index 84739e6d8..a17aa1f86 100644 --- a/editions/tw5.com/tiddlers/howtos/How to create plugins in the browser.tid +++ b/editions/tw5.com/tiddlers/howtos/How to create plugins in the browser.tid @@ -1,5 +1,5 @@ created: 20140213122133816 -modified: 20140213123117851 +modified: 20140214124024493 tags: howto title: How to create plugins in the browser type: text/vnd.tiddlywiki @@ -11,9 +11,9 @@ The recommended technique for building TiddlyWiki plugins involves running [[Tid Loading a plugin in the browser has several consequences: * The original plugin tiddler itself is unchanged -* The payload tiddlers are set up as ShadowTiddlers +* The payload tiddlers are set up as individual ShadowTiddlers -To make a modified copy of a plugin, one edits the constituent shadow tiddlers (which actually overrides the shadow tiddler with a new non-shadow tiddler containing the modified content). The repacking process retrieves the current value of all the shadow tiddlers included in the plugin, and then packs the new value into the original plugin tiddler. +To make a modified copy of a plugin, one edits the constituent shadow tiddlers (doing this actually overrides the shadow tiddler with a new non-shadow tiddler containing the modified content). The repacking process retrieves the current value of all the shadow tiddlers included in the plugin, and then bundles the new values back into the original plugin tiddler. ! Step by step @@ -49,7 +49,7 @@ Create the payload tiddlers by clicking on the links in the ''HelloThere'' tiddl !! 4. Pack the plugin -Open the browser developer console, and type the following JavaScript statement, but first change the first parameter to the name of your plugin. The second parameter is an array of tiddler titles to be added to the plugin: +Open the browser developer console, and type the following JavaScript statement, but first change the first parameter to the name of your plugin. The second parameter is an optional array of tiddler titles to be added to the plugin: ``` $tw.utils.repackPlugin("$:/plugins/yourname/pluginname",["$:/plugins/yourname/pluginname/mywidget.js"])