I hacked at it a bit more. At this point, I can get a static timestamp (now too interesting, but proof of concept).
Here's my code:
<prefix>>
suffix=<<suffix>>
/>
Put this in a toolbar tiddler ($:/core/ui/EditorToolbar/Annotate-Text) replaces selected text with this in the tiddler currently being edited:
<<annotation 'Text' 'selected text' '20170401010101'>>
I'd love to replace the static timestamp with $timestamp$, generated by the set comand. Note I still need to close the timestamp with a single quote, and to close the suffix with ">>". I think it is only a matter of making $timestamp$ a parameter...
Thanks!
//steve.