1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Docs: Clarify use of "actionTiddler" variable

This commit is contained in:
Jermolene 2019-01-18 08:57:08 +00:00
parent 273768da1d
commit 7c0528340d
3 changed files with 13 additions and 5 deletions

View File

@ -1,7 +1,10 @@
created: 20170406083917224
modified: 20170406084026289
modified: 20190118084621046
tags: Variables [[Core Variables]]
title: actionTiddler Variable
type: text/vnd.tiddlywiki
Within the ''action'' string of the DroppableWidget, the <<.def actionTiddler>> [[variable|Variables]] contains the title of the tiddler being dropped.
The variable `actionTiddler` is used in subtly different ways by different widgets:
* Within the ''actions'' string of the DroppableWidget, the <<.def actionTiddler>> [[variable|Variables]] contains the title of the tiddler being dropped.
* Within the ''startactions'' and ''endactions'' string of the DroppableWidget, the <<.def actionTiddler>> [[variable|Variables]] contains a quoted [[Title List]] of all of the titles being dragged.

View File

@ -1,6 +1,6 @@
caption: draggable
created: 20170406081938627
modified: 20170406083157871
modified: 20190118084621046
tags: Widgets
title: DraggableWidget
type: text/vnd.tiddlywiki
@ -23,6 +23,9 @@ See DragAndDropMechanism for an overview.
Either or both of the ''tiddler'' and ''filter'' attributes must be specified in order for there to be a payload to drag.
The ''actionTiddler'' variable is accessible in both //startactions// and //endactions//. It holds the payload tiddler(s) specified through the //tiddler// attribute.
The [[actionTiddler Variable]] is accessible in both //startactions// and //endactions//. It holds the payload tiddler(s) specified through the //tiddler// and //filter// attributes as a [[Title List]] using double square brackets to quote titles that include whitespace.
<<.tip """Note that the [[actionTiddler Variable]] holds a [[Title List]] quoted with double square brackets. This is unlike the DroppableWidget which uses the same variable to pass a single unquoted title.""">
The LinkWidget incorporates the functionality of the DraggableWidget via the ''draggable'' attribute.

View File

@ -1,6 +1,6 @@
caption: droppable
created: 20170406082820317
modified: 20170406085304387
modified: 20190118084621046
tags: Widgets
title: DroppableWidget
type: text/vnd.tiddlywiki
@ -38,6 +38,8 @@ Within the action string, there are two Variables generated by the DroppableWidg
If multiple items are dropped then the actions are performed repeatedly, once for each dropped item.
<<.tip """Note that the [[actionTiddler Variable]] holds a single, unquoted title. This is unlike the DraggableWidget which uses the same variable to pass a quoted [[Title List]].""">
! Examples
This example displays a palette of icons. Dragging a tiddler onto one of the icons assigns that icon to the tiddler.