이 문서는 https://tiddlywiki.com/languages/ko-KR/에서 티들리위키의 정적 HTML 표현의 일부입니다

Pragma: \widget

2023년 4월 19일 오전 10:31

New in v5.3.0 The \widget pragma is used to define custom widgets. It is a shortcut syntax for the SetVariableWidget with an implicit ParametersWidget.

The usual form allows custom widgets to span multiple lines:

\widget <widget-name>(<param-name>[:<param-default-value>],<param-name>[:<param-default-value>]...)
<multiple-line-definition-text>
\end [<widget-name>]

Note that the \end marker can optionally specify the name of the widget to which it relates which allows widget definitions to be nested.

There is also a single line form for shorter widgets:

\widget <widget-name>(<param-name>[:<param-default-value>],<param-name>[:<param-default-value>]...) <single-line-definition-text>

The first line of the definition specifies the widget name and any parameters. Each parameter has a name and, optionally, a default value that is used if no value is supplied on a particular call to the widget. The lines that follow contain the text of the widget text (i.e. the snippet represented by the widget name), until \end appears on a line by itself:

See Custom Widgets for more details.