Hi Josiah,
You may like the below macro!
\define append-text(tidTitle, text:"", btnLabel:"Append Text", sep:"<br>")
<$button> $btnLabel$
<$list variable="newText" filter=
"[<__tidTitle__>get[text]addsuffix<__sep__>addsuffix<__text__>]" >
<$action-setfield $tiddler=<<__tidTitle__>> text=<<newText>> />
</$list>
</$button>
\end
*Examples*
Test on Tiddlywiki.com. Create two tiddlers, titles TidA and TidB
Example 1:
<<append-text tidTitle:"Tidb" text:"This is another text">>
Example 2:
<$macrocall $name=append-text tidTitle="TidB" text={{TidA}} sep=" " />
Remarks
Note changing a field needs some kind of triggering widgets! So, here I
used a button!
- *tidTitle *gets the title of tiddler you want to append text to it
- *text *the text to be appended
- *btnLabel*: the label for button
- sep: the separator is used when appending text to end of the text of
tiddler
If you want to append text of a base tiddler use syntax of example 2.
I hope other people gives their solutions, comment for a better and more
concise macro!
--Mohammad
On Thursday, April 4, 2019 at 7:05:32 PM UTC+4:30, @TiddlyTweeter wrote:
>
> The use case is you create a tiddler and realise it would be better added
> to another (not via transclusion, rather, the literal content of "text" is
> appended to another Tiddler's "text" field.).
>
> Do you know how to do this?
>
> Any tips appreciated.
>
> Best wishes
> Josiah
>
--
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/d8d7561c-3e99-4511-a7d2-f75f46c51bdf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.