Maybe I didn't explained properly. Sorry for that.
In the example you send me, I need the call to the macro receives the content of a field as parameter. Like this:
<<removetag text {{myTiddler!!caption}}>>
I'll try to explain more:
If you set a username in the config, every draft opened appends 'by username' in the title. This username is stored in the tiddler $:/status/UserName. I have a button in my wiki that triggers a tm-new-tiddler action based on a template. This opens a tiddler for editing with the contents of the template, including the tag of the template ($:/tags/template) and I want to remove it before saving the new tiddler.
But I can't send the content of $:/status/UserName as a parameter of the function in order to concatenate it after 'Draft of ... by'.
I know it could be easily done by typing the username in the macro (as is a single file and there is only one user) or simply deleting de username from de config, but I plan to make this wiki multi-user in the future.
Thank you!