I am trying to add an “Macro Button ” on Tiddlers
like the above.
adding the action of removing a field (or modify value) from the concerned Tiddler.
After few hours searching for a way to do it,
i didn’t found any good “step by step” tutorial.
Let’s try to make one.
My 1st questions
Does it needs to modify $:/core (as i saw for some solutions) ?
What are the “$:/ressources” & “$:/tags” in use there?
Is there a way to do it in “javascript”, and/or “tid script” ?
… ?
As Eric pointed to, that is where to start. However as is common in tiddlywiki, being open, readable code, look at an existing view toolbar button, to see how the core does it, and possible clone and modify one.
use <<tag $:/tags/ViewToolbar>> to see the active ones.
Avoid this while you are still learning, its like you have a hammer (javascript) and every solution is a Javascript nail.
Tiddlywiki is more than capable of handling 99.9% or possible buttons.
I’m just cross-posting here, pointing you to my reply on the other thread, where your interest in a new toolbar button was first brought up:
Check out a quick version of this kind of solution here:
This is a button that will appear ONLY on tiddlers that have the is_volatile field, and clicking the button should toggle that field to “no”.
I’m calling the button “AdoptExternal” (hoping that’s fairly clear as a metaphor), and I’ve given it the paper-clip icon, for now (since it’s a bit like attaching). Feel free to tweak as needed!
I’m not removing the field itself (just setting it to “no”), in order to maximize your ability to tro…
papiche:
Does it needs to modify $:/core (as i saw for some solutions) ?
Nope!
papiche:
What are the “$:/ressources” & “$:/tags” in use there?
The most essential tag for this kind of project is $:/tags/ViewToolbar
Is there a way to do it in “javascript”, and/or “tid script” ?
[/quote]
No javascript needed! It’s all wikitext.