raw transclude?

54 views
Skip to first unread message

Jean-Pierre Rivière

unread,
Apr 6, 2021, 9:29:49 AM4/6/21
to TiddlyWiki
As I am writing some technical notes about programming in tiddlywiki, it occured to me that it would be cool to have a tiddler with code (not necessarily a macro, just a bit of tw code and not javarscript (although perhaps also js)) and to use that tiddler to display raw code and to executee it.

Alas, the transclusion mechanism doesn't do for it. Perhaps it should be added as a parameter to the tiddler widget too.

What I'd like is to have:

<$transclude mode=raw tiddler=mycode/>

which would transclude mycode as if it was set to text instead of tw5 type.

complete use case below:

|code|results|h
|<$transclude mode=raw tiddler=mycode/>|<$transclude tiddler=mycode/>|
|<$transclude mode=raw tiddler=myothercode/>|<$transclude tiddler=myothercode/>|

What do you think about it?

Regards.

PMario

unread,
Apr 6, 2021, 10:32:20 AM4/6/21
to TiddlyWiki
Hi,
The \define .example(n,eg,egvar:NO-SUCH-VAR) example macro may be what you want.
-m

Jean-Pierre Rivière

unread,
Apr 6, 2021, 11:38:27 AM4/6/21
to TiddlyWiki
Hi.

I'm not sure what is the purpose of the .example macro and then I failed to see how it could help me... Could you elaborate a little more?
Reply all
Reply to author
Forward
0 new messages