So, here it is. And it's really simple.
- Create a New Tiddler by clicking on the "new tiddler" link in your TiddlyWiki
- Choose a name for your plugin (tiddler) - standards say you should end the name with the word "Plugin". e.g. TiddlyLockPlugin
- The body of the tiddler at it's simplest is just straight JavaScript
alert('Hello, World');
- You can add standard TiddlyWiki content as well to provide some comments, usage info and other supporting documentation. This text must be 'commented out' using the standard JavaScript commenting characters // or /* ... */ remember, the content of the tiddler is interpreted as JavaScript
- You should also surround your JavaScript code with {{{ and }}} to allow it to be displayed by TiddlyWiki without being interpreted by the browser.
/***
this is the Hello, World plugin
|Hello, World|a simple sample plugin|
!!! here comes the code ...
***/
{{{
alert('Hello,World');
}}}
- Include "systemConfig" as one of the tags for the tiddler.
- Save your tiddler and reload the TiddlyWiki. The 'Hello, World' alert box should appear.
1 comment:
Extremely simple. Thanks Bud, nothing could be easier than this.
Post a Comment