Merge branch 'tiddlywiki-com'

This commit is contained in:
Jeremy Ruston
2026-01-16 17:36:54 +00:00
2 changed files with 20 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
caption: tag-pill
created: 20161128190930538
modified: 20161128191220364
modified: 20260114112210310
tags: Macros [[Core Macros]]
title: tag-pill Macro
type: text/vnd.tiddlywiki
@@ -9,13 +9,18 @@ The <<.def tag-pill>> [[macro|Macros]] generates a static tag pill showing a spe
!! Parameters
;tag
; tag
: The title of the tag
;element-tag
: The element name to be used for the pill (defaults to "span")
;element-attributes
: Additional attributes for the pill element
;actions
: Action widgets to be triggered when the pill is clicked. Within the text, the macro parameter ''tag'' contains the title of the selected tag.
; element-tag
: The element name to be used for the pill (defaults to HTML element SPAN).
: If an ''actions'' parameter is used the element-tag needs to be set to `$button`
; element-attributes
: Additional attributes for the element specified in ''element-tag''
; actions
: If an actions parameter should be activated, the ''element-tag'' parameter needs to be set to `$button`.
: Action widgets to be triggered when the pill is clicked. Within the text, the macro parameter ''tag'' contains the title of the selected tag
<<.macro-examples "tag-pill">>

View File

@@ -1,5 +1,5 @@
created: 20230803034230294
modified: 20230803043848449
modified: 20260114112240512
tags: [[Macro Examples]] [[tag-pill Macro]]
title: tag-pill Macro (Examples)
@@ -12,3 +12,9 @@ This example displays the [[Definitions]] tag as an unclickable, but still-style
<$transclude $variable=".example" n="2" eg="""<<tag-pill Definitions element-tag:"big" element-attributes:"inert">>"""/>
<$transclude $variable=".example" n="3" eg="""\procedure tag-actions()
<$action-confirm $message="test"/>
\end
<$transclude $variable="tag-pill" tag="asdf" element-tag="$button" actions=<<tag-actions>>/>
""">>