1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Docs updates

This commit is contained in:
Jermolene 2014-02-14 12:40:37 +00:00
parent 4836cf83e2
commit e43a190dab

View File

@ -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"])