Hi Mat,
I tried this, but it throws a js error. No idea why:
title: $:/_my/ui/button/datestamp
tags: $:/tags/EditToolbar
\define button()
<$button>
<$action-setfield $field="text" $value="""$(currentText)$
$(dateStamp)$"""/>
{{$:/core/images/new-journal-button}}
</$button>
\end
<$vars currentText={{!!text}} dateStamp=<<now "YYYY-0MM-0DD">>>
<<button>>
</$vars>
Also, I am thinking the action-setfield method should support:
— *prepend* the specified value to the existing value of the target field /
index
— *append* the specified value to the existing value of the target field /
index
— *replace* the specified text with the defined value in the target field /
index
Best wishes,
Tobias.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/6662a936-d2de-4b8b-9092-491545e50876%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.