sometimes it’s just a matter of that first few steps and things start to fall in place.
Here is my date-stamp tid - just tested and this alone will add the button to the toolbar
caption: date-stamp
condition: [<targetTiddler>!has[type]] [<targetTiddler>type[text/vnd.tiddlywiki]]
description: Insert date-stamp
icon: $:/core/images/timestamp-on
list-before: $:/core/ui/EditorToolbar/stamp
shortcuts: ((date-stamp))
tags: $:/tags/EditorToolbar
title: $:/_/date-stamp
type: text/vnd.tiddlywiki
\define date-stamp() $(datetime)$
<$vars datetime=<<now "@@.date ddd DD mmm YYYY 0hh:0mm:0ss@@">> >
<$action-sendmessage
$message="tm-edit-text-operation"
$param="insert-text"
text=<<date-stamp>>
/>
</$vars>
<!-- based on here https://talk.tiddlywiki.org/t/an-editor-toolbar-button-to-insert-user-signature-with-timestamp/1949 -->
Then to have a keyboard shortcut, create $:/config/shortcuts/date-stamp
with the content describing the hotkey you want. Mine simply has the content ctrl-d
, with no tags, no other fields.
Once the keyboard shortcut is there, then it can also be seen in the Control Panel. (occurs to me that it should be visible there as soon as it’s defined in the “shortcuts” tag of the initial tid, but that’s outside the scope of answering you here)