2023년 7월 23일 오후 9:54
Name | Description |
---|---|
param | Title of the tiddler to be displayed |
{any other params} | Any other parameters are made available as variables within the context of the widget message. |
rootwindow | Introduced in v5.1.18 yes or true will always display a modal in the wiki-root-window |
The modal message is usually generated with the ButtonWidget. The modal message is handled by the TiddlyWiki core.
Fields within the tiddler being displayed in the modal can be used to customise its appearance.
paramObject
The "currentTiddler" variable is set to the title of the modal tiddler, but can be overridden by specifying a different value in paramObject
.
Example
Here is an example of displaying a modal and passing parameters to it:
(Note how all parameters to action-sendmessage
other than $param
and $message
are available as variables within the modal.)
Your name: <$edit-text tiddler="$:/temp/yourName" tag="input" default="Your name"/>
Your message:
<$edit-text tiddler="$:/temp/yourMessage" default="Your message"/>
<$button>
<$action-sendmessage $message="tm-modal" $param="SampleModal" yourName={{$:/temp/yourName}} yourMessage={{$:/temp/yourMessage}}/>
Click me!
</$button>
That renders as:
Your name:
Your message: