<$wikify name="newText" text="""<$macrocall $name="utility" par1=<<val1>> par2=<<val2>> />""" >
<$action-setfield $tiddler="""$tidName$""" $field="text" $value=<<newText>> />
</$wikify>
This is //italic// and this is {{!!caption}}--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/099d67c2-8bb2-41c9-a372-f0948167bf41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
\define utility(a, b) This is //$a$// and ''$b$''.
\define test(tidName, v1, v2)<$wikify name="newText" text="""<$macrocall $name="utility"a=<<__v1__>> b=<<__v2__>>/>"""><$action-setfield $tiddler="""$tidName$""" $field="text" $value=<<newText>> /></$wikify>\end
<$button>Do it<<test "myTiddler" italic bold>></$button>This is //italic// and ''bold''.This is italic and bold.To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3f5cf631-8ae6-4096-bdcf-c328891cee48%40googlegroups.com.
An alternate solution that might be useful would be an alternate mode to the <$macrocall> widget whereby it makes the result of calling the macro available as a variable, instead of directly rendering it.
<$macrocall store=?>
scope of that var
</$macrocall>I think Jeremy is suggesting storing the macro output in a variable as a future feature. This is a bit like allowing us to pipe the output of one macro into another.
I think this would be helpful, and would make some solutions much easier to code.
I would love to find a way to store a variable in a more permanent form without a button. Or store it in a field or text reference. Even if the value must be reevaluated on render.
Regards
Tony
\define mac2(p) {{{ [<__p__>split[]addprefix[c]] }}}
\define utility(a, b)
This is //$a$// and ''$b$''.
<$macrocall $name="mac2" p=<<__a__>> />
\end
\define test(a,b)
<$set name="newText" value=<<utility a:"""$a$""" b:"""$b$""">>>
<$text text=<<newText>> />
</$set>
\end
<<test italic bold>>This is //italic// and ''bold''. <$macrocall $name="mac2" p=<<__a__>> />
This is //italic// and ''bold''. cictcaclcicc