Last request of 2022 (?)

This is similar to: An Editor Toolbar Button to Insert User Signature with Timestamp

Your code would look like:

\define mytext() <<strex content:"$(mycontent)$" id:"$(myid)$">>
<$vars 
  mycontent={{{ [[$:/status/UserName]get[text]else[Anonymous]] }}}
  myid=<<now "YYYY-0MM-0DD-0hh:0mm:0ss">>
>
<$action-sendmessage
	$message="tm-edit-text-operation"
	$param="insert-text"
	text=<<mytext>>
/>
</$vars>

The trick is to:

  1. create your /define macro using $(name)$ substitution
  2. defined the $(name)$ values using $set
  3. insert the now substituted values into your edit-text.

My noob $0.02 :slight_smile:
Jeff