How do I display nested transclusion within a codeblock?

55 views
Skip to first unread message

Branimir Braykov

unread,
Nov 27, 2019, 5:39:36 PM11/27/19
to TiddlyWiki

I have problems figuring out how to (properly) achieve the following:
I have a tiddler called "test". There are 3 fields in it:

  • field a = abc
  • field b = def
    But
  • field c = {{!!a}}-concat-{{!!b}}

When I just test with transclude, field c as {{test!!c}} in another tiddler I see the rendered concatenated value: abc-concat-def. But if I try to put it in a codeblock widget I get this its definition: {{!!a}}-concat-{{!!b}}.

Now what I eventually want is to display the value of test!!c within a codeblock with a copy-to-clipboard button.

Mark S.

unread,
Nov 27, 2019, 6:33:10 PM11/27/19
to TiddlyWiki
Not sure what you mean by "codeblock" in this context.

But if you were using the copy-to-clipboard macro, then you could wikify the text first:

<$wikify name="copyme" text={{!!c}}>
<$macrocall $name="copy-to-clipboard" src=<<copyme>>/>
</$wikify>

Branimir Braykov

unread,
Nov 28, 2019, 2:03:15 AM11/28/19
to TiddlyWiki
Yes, it seems is the wikify moment I was missing.
By codeblock I mean the CodeBlockWidget or just to have this text in <pre> tags and have the exactly as this is made in tiddlywiki.com. Examples are all in a codeblock with the option to copy it to the clipboard, the button properly aligned to the top right of the text. Minus the Try button part.
Reply all
Reply to author
Forward
0 new messages