I am currently using TiddlyWiki Classic and I want to add the "newTiddler" button into ToolbarCommands so that it is present on all tiddlers. I also just feel like it should be with those buttons. I tried just adding "newTiddler" into the ToolbarCommands, but it just does not work. Anyone know how this can be done?
Asked
Active
Viewed 392 times
1 Answers
0
Well, you can't just add a macro into toolbar since toolbar is a separate macro, not a transclusion. You have to create a new command (below I'm writing JS code that you should use as a plugin):
config.commands.newTiddler = {
text: "new tiddler", // or whatever you want to see on the button
tooltip: "Create a new tiddler",
handler: function(event,src,title) {
var currentTiddler = story.getTiddler(title);
story.displayTiddler(
currentTiddler, // to open it below the current tiddler; if you want it on top, put null instead
config.macros.newTiddler.title, // default title, you may use anything you want
DEFAULT_EDIT_TEMPLATE // you may use a custom one, though
);
}
};
Just create a tiddler (like NewTiddlerToolbarPlugin), put the code there, tag it systemConfig
, restart TW and add the new command (newTiddler
) to the ToolbarCommands.

YakovL
- 7,557
- 12
- 62
- 102
-
You can also get some help at https://groups.google.com/forum/#!forum/tiddlywikiclassic – YakovL May 22 '18 at 14:39