I want to be able to scroll to an element inside a <$scrollable> widget when I load/render/open the tiddler. I thought of using the <$action> widget like this:
<$button>
<$action-sendmessage $message="tm-scroll" $name="selector" $value={{!!tiddler-id}}/>
scroll to element
</$button>
Is there a way I can do this? Is there another way to activate $message="tm-scroll"?
Also ask yourself what leads to the “tiddler load/render/open” because if you provide the list that leads to opening a tiddler you can add an action their in to open on click. For example if you are using the TOC macro(s), you could build your own or modify an existing one.
Alternatively you may use the message catcher widget to wrap places where the links you navigate from and include your additional actions on tiddlers.
The trick with a community like ours is to put your best effort into sharable hacks than bespoke solutions, and the community helps and benefits.
I finally had time to play around with this, and I got this <$trigger> macro to work. I figured a plugin like this would work. I am not having any issues with endless loops for now at least. I wasn’t worried about losing anything, all my data is still on TWC. Thanks for the help!
If you are careful and if you have no typos in your variable names, everything should be fine. …
But I do write a warning, because there is a possibility to “brick” your wiki. … It doesn’t “destroy” itself, like in the movies but it is possible to make the UI unresponsive. …
TiddlyWiki has a “safe mode”. See: https://tiddlywiki.com/#SafeMode, with which you can start it, with all plugins deactivated. In most cases this is enough to “disable” plugins that “go rogue”. … Just to be sure.