How to transclude <<actionTiddler>>'s text or <$set> its text to a variable?

84 views
Skip to first unread message

hubertgk

unread,
Jan 22, 2018, 5:13:02 AM1/22/18
to tiddl...@googlegroups.com
Hello,

Is there a way to transclude <<actionTiddler>>'s text or <$set> its text to a variable?

Since <<actionTiddler>> is short-lived, in that it's created on drag and destroyed on drop, I assume that transcluding and setting its text to a variable would need to be performed using some kind of an <$action> within the <$droppable> widget.

The problem I have is that I'm unable to transclude <<actionTiddler>> in any way at all, even in that short period of time when this tiddler exists.

I can manipulate the <<actionTiddler>> itself (set its fields etc) but not read anything from it. Is that by design or is there a way to pass <<actionTiddler>>'s text, fields etc further?

In the example code below I'm trying to set <<actionTiddler>>'s text to a tiddler called _temp, however in this way I'm only setting its title, because {{actionTiddler}} would not work:


\define OnDrop()
<$action-setfield $tiddler=_temp text=<<actionTiddler>>/>
\end

<$droppable actions=<<OnDrop>>>
drop here
</
$droppable>

<table>
<tr>
<<list-links filter:"[tag[test]]">>
</tr>
</
table>


Thank you in advance for your suggestions!

Regards,
-Hubert

ste...@gmail.com

unread,
Jan 25, 2018, 5:49:37 PM1/25/18
to TiddlyWiki
Hi,

On Monday, January 22, 2018 at 11:13:02 AM UTC+1, hubertgk wrote:

Is there a way to transclude <<actionTiddler>>'s text or <$set> its text to a variable?

Ran into the same problem today. This code works for me on https://tiddlywiki.com/:

\define droppable-actions()
<$action-sendmessage $message="tm-modal" $param="SampleModal" yourMessage={{{ [<actionTiddler>get[text]] }}}/>
\end

<$droppable actions=<<droppable-actions>>>
Drop tiddler here to display its content
</$droppable>


Cheers

Stef

hubertgk

unread,
Jan 26, 2018, 4:30:34 AM1/26/18
to TiddlyWiki
Thank you!
Reply all
Reply to author
Forward
0 new messages