I just want to remind you I have a demo wiki here https://all-button-actions.tiddlyhost.com
I moved the examples to their own tiddler and added another example wich is actualy quite good;
Example add an action to the close button
See “On close open focused” tiddler, which is tagged $:/tags/button-actions/close and as a result will be actioned each time you use the close button in this wiki.
- What this does is rather than just close the tiddler, it will close and navigate to the last tiddler according to the value in
$:/HistoryList!!current-tiddler - The condition ensures if you close the current-tiddler it will not imediatly reopen it.
- You could modify the condition to only navigate with ctrl-click
What is nice about it is if you scroll down selectively closing tiddlers the focus always returns to the last tiddler (If is not one you closed).
Well it is now, Just visit my demo site, create a tiddler and tag it $:/tags/button-actions/save
- Now enter any actions you want to happen on every click of the save button, the “tick button” in the edit view.
- Remember you can wrap it in a list or reveal widget to do a conditional check, like
!has[stream-type]
For reference purposes, I stumbled on a prior attempt by me to achieve this.