I’m looking to package up some of my homegrown TiddlyWiki functionality into a nicer plugin package. In doing so, I’m learning about plugins (using the TiddlyWiki Markdown and Kookma Commander plugins as templates). I’ve got a $/plugins/peter/asdf
with this in the text
:
{
"tiddlers" : {
"$:/plugins/peter/asdf/js_demo.js" : {"created":"20250325032635462","text":"alert(\"test\");","title":"$:/plugins/peter/asdf/js_demo.js","modified":"20250325032701920","module-type":"library","type":"application/javascript"}
}
}
This ought to create a plugin with one tiddler - that has alert("test");
in its text
. It does when I save and reload my wiki (and the shadowing of the tiddler works as I’d expect). The thing I’m struggling with is that the JavaScript is never run.
I’m sure I’m missing something. I didn’t find anything in the documentation. Besides marking the module-type
, is there any other secret sauce to getting the JavaScript to execute?
Thanks!