JS widget/macro docs?

Hi,

I’ve started to customize my TW, but defining macros/widgets seems a bit arcane. Both because TW-flavored js seems to use the relatively old prototype-based classes style (which I don’t mind too much, it’s actually quite nice) and there doesn’t seem really to be documentation on how to make your own macros/widgets (which is kinda a problem).

I can just copy/paste code, but I feel really uncomfortable with that. Are there any resources for learning to make widgets, or should I just go through the whole TW codebase? (not too daunting of a proposition, to be honest, will just take some time.)

https://tiddlywiki.com/dev/

Have you checked this?. I am not a developer, so someone else may have a better answer for you.

I knew about this, but I thought it had less information than it actually had. I looked at it and learned a bunch of new things; thank you!

You can find a detailed, interactive tutorial on how to write javascript widgets here: TW widget tutorials — Step-by-step widget demonstrations

6 Likes

Hi @btheado – that’s terrific, I don’t think I’ve seen it before. Would you be willing to contribute it to tiddlywiki.com/dev?

Very nice! After learning tiddlywiki’s default filters, macro and widgets, creating my own is the next logical step but it has always been quite hard for me to find learning resources and get started.
Thanks a lot for writing this tutorial !

It has been almost 4 years now since I first wrote it and posted it. You had the same suggestion then and I agreed, but never got around to it :frowning:. Maybe this time I will do something about it :crossed_fingers:.

1 Like

This is wonderful! (and yes I agree with Jeremy: it would be nice to have this in the official development docs.)

Thanks for posting it!

it would be nice to have this in the official development docs.

Done. The tutorial is now available at https://tiddlywiki.com/dev/#Javascript%20Widget%20Tutorial

2 Likes