Passing transcluded content to javascript widget

34 views
Skip to first unread message

matthia...@gmail.com

unread,
Jul 24, 2023, 5:57:36 PM7/24/23
to TiddlyWiki
Hi,

I am feeling stupid, like every few months when trying something new with tiddlywiki.

I think I still do not get the concept of variables, widgets, procedures.....

What I want to do is generate a plantuml diagram, using the tw5-plantuml plugin.
I do want to dynamically create it, to show incomming and outgoing links.
I tried but could not get tiddlywiki to pass the "rendered" text to the javascript widget.


\procedure mmap()
@startmindmap
<<currentTiddler>>
skinparam topurl https://cthulhu.bilger.info
<$list filter="[all[current]backlinks[]]">
-- <<currentTiddler>>
</$list>
<$list filter="[all[current]links[]]">
++ <<currentTiddler>>
</$list>
@endmindmap
\end

\widget $the.mmap2()
<<mmap>>
\end

\procedure puml(s)
<$plantuml source=<<s>> />
\end

\procedure plinks()
<$the.mmap2/>
<$vars sentence=<$the.mmap2/>>
<$transclude $variable=puml s=<<mmap>> />
</$vars >
\end

[[e]]
[[f]]


<<plinks>>


Could someone give me a hint?

Thanks a lot.
Reply all
Reply to author
Forward
0 new messages