» tagged pages
» logout
tiddlywiki

Tags Applied to this Entry

1 person has tagged this page:
NameHelloWorldMacro
Created bySimonBaird
Locationhttp://simonbaird.com/mptw/#HelloWorldMacro
Version1.1
RequiresTW2.x

Description

It's a Hello World TiddlyWiki macros.

History

  • 11-Jan-06, version 1.1, updated for TW2.0

Examples

SourceOutput
<<helloWorld dude>>Error in macro <<helloWorld>>
<<helloWorld 'to everyone'>>Error in macro <<helloWorld>>
(You can use (single or double) quotes or double square brackets for params with spaces)

Notes

This is intended to help you get started with customising your TW. To make the macro work you have to give this tiddler a tag of systemConfig then save and reload. To learn more about customising Tiddlywiki? Look at other people's plugins or... click View, Source in your browser and start reading. :)

Code

config.macros.helloWorld = {};
config.macros.helloWorld.handler = function (place,macroName,params,wikifier,paramString,tiddler) {
	var who = params.length > 0 ? params[0] : "world";
	 wikify("Hello //" + who + "// from the '" + macroName + "' macro in tiddler [[" + tiddler.title + "]].", place);
}
Username:
Password:
(or Cancel)