You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
Hello everybody!
I'm stuck in a basic and probably easy thing: I cannot get any javascript macro to work in my tiddlywiki. My wiki is a 5.1.19 version running on nodejs.
/* Run the macro */ exports.run = function(character, address) { if( !character) character = "Bugs Bunny"; if( !address) address = "Rabbit Hole Hill"; var output ="Hi, I'm " + character + " and I live in " + address; return output; };
})(); ============
This is quite simple and it works perfect on TW5 Magicks Tiddlywiki. I imported this above tiddler to my wiki and the field definitions came with it: 'Type: application/javascript' and 'module-type: macro'.
TW5 Magick, the source of this example, runs on an outdated 5.0.7-beta. To access the macro a simple <<mysamplemacro "Donald Duck">> does it there.
On my 5.1.19: nope.
At tiddlywiki.com I found the \define pragma for standard macros. I found https://tiddlywiki.com/dev/index.html#JavaScript%20Macros, which explains the basics of javascript macros. I was reading google groups for hours. But I didn't find out how to bring this together to a working solution in a current version of tiddlywiki.
Could someone please give me an example how to access this macro?
Thank you!
BurningTreeC
unread,
Jul 3, 2019, 6:31:09 AM7/3/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
Hi, I've tried your example and it works for me on a recent tiddlywiki
Maybe you just forgot to save and reload?
rooster91an
unread,
Jul 3, 2019, 7:13:31 AM7/3/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to TiddlyWiki
Hi BurningTreeC
you are right. I had to restart my tiddlywiki nodejs server. Didn't know that.