I’m trying to create a custom link widget that will let me have a tooltip that previews some of the text of the linked tiddler. The code below works if you take out the $wikify. But I want the tooltip to display the rendered text. But when I use $wikify I get a recursive error.
I know there’s an old Tobias plugin that does this, but wouldn’t it be great if it could work with the new toolset from 5.3.0 ?
Thanks!
Kind of like a human LLM, I cobbled this code from these two threads:
\widget $link()
<$parameters $params="params-var">
<$let newtip={{{[<params-var>jsonget[to]get[text]split[]limit[50]join[]]}}} >
<$wikify text=<<newtip>> name="newtip2" output="text">
<$genesis
$type="$link"
$remappable="no"
$names="[<params-var>jsonindexes[]] =[[tooltip]]"
$values="[<params-var>jsonindexes[]] :map[<params-var>jsonget<currentTiddler>] =[<newtip2>]"
>
</$genesis>
</$wikify>
</$let>
</$parameters>
\end
* <$link to="HelloThere" tooltip="something">has a tooltip link</$link> to a tiddler
* [[HelloThere]] is a tiddler in TiddlyWiki.