mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-01 01:26:43 +00:00
The last batch of drag and drop docs
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
caption: button
|
||||
created: 20131024141900000
|
||||
modified: 20160429175044822
|
||||
modified: 20170406085706139
|
||||
tags: Widgets
|
||||
title: ButtonWidget
|
||||
type: text/vnd.tiddlywiki
|
||||
@@ -30,14 +30,16 @@ The content of the `<$button>` widget is displayed within the button.
|
||||
|param |The optional parameter to the message |
|
||||
|set |A TextReference to which a new value will be assigned |
|
||||
|setTo |The new value to assign to the TextReference identified in the `set` attribute |
|
||||
|selectedClass |An optional additional CSS class to be assigned if the popup is triggered or the tiddler specified in `set` already has the value specified in `setTo` |
|
||||
|default |Default value if `set` tiddler is missing for testing against `setTo` to determine `selectedClass` |
|
||||
|popup |Title of a state tiddler for a popup that is toggled when the button is clicked |
|
||||
|aria-label |Optional [[Accessibility]] label |
|
||||
|tooltip |Optional tooltip |
|
||||
|class |An optional CSS class name to be assigned to the HTML element|
|
||||
|style |An optional CSS style attribute to be assigned to the HTML element |
|
||||
|selectedClass |An optional additional CSS class to be assigned if the popup is triggered or the tiddler specified in `set` already has the value specified in `setTo` |
|
||||
|tag |An optional html tag to use instead of the default "button" |
|
||||
|default |Default value if `set` tiddler is missing for testing against `setTo` to determine `selectedClass` |
|
||||
|dragTiddler |An optional tiddler title making the button draggable and identifying the payload tiddler. See DraggableWidget for details |
|
||||
|dragFilter |An optional filter making the button draggable and identifying the list of payload tiddlers. See DraggableWidget for details |
|
||||
|
||||
''Note:'' In almost all other cases where a TextReference is used as a widget attribute, it will be placed between curly brackets, to [[transclude|Transclusion in WikiText]] the value currently stored there. However, when we use a TextReference as the value of a button widget's `set` attribute, we are referencing //the storage location itself//, rather than the value stored there, so we do ''not'' use curly brackets there. //Example:// we could code a button widget that sets the `caption` field of TiddlerA to be the same as that of TiddlerB as:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user