1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-17 19:09:55 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/features/Modals.tid
lin onetwo 451a3454b5
Optionally allow click outside to close modals (#7072)
* feat: option to allow click on modalBackdrop to close modal

* feat: allow switcher modals closable

* feat: allow use caption field as modal title

* refactor: make maskClosable a variable

* fix: use "true"

* fix: code style

* docs: add description about maskClosable

* fix: convention is to have double quotes for strings in the TW core

* refactor: using a "mask-closable" field on the modal tiddlers instead of as a message parameter

* docs: move to modal tid

* Update WidgetMessage_ tm-modal.tid
2022-12-03 17:26:44 +00:00

25 lines
1.1 KiB
Plaintext

created: 20160107225427489
modified: 20211221102625141
tags: Features
title: Modals
type: text/vnd.tiddlywiki
Modals (or "wizards") fade the main TiddlyWiki window to display an isolated tiddler that must be explicitly dismissed by the user.
The tiddler to be displayed can contain the following optional fields that are used to customize the modal:
|!Field |!Description |
|footer|The footer text for the modal|
|subtitle|The subtitle text for a modal, displayed in a `h3` html tag|
|class|An additional class to apply to the modal wrapper|
|help|An optional external link that will be displayed at the left of the footer with the text "Help"|
|mask-closable|When set to ''yes'' or ''true'', will close the modal dialog when the mask (area outside the modal) is clicked|
Note that the footer and subtitle fields are not limited to plain text, and wiki text features such as widgets and transclusions can be used as well.
Modals are displayed with the [[WidgetMessage: tm-modal]].
<$button message="tm-modal" param="SampleWizard">Open demo modal</$button>
<<.tip """<$macrocall $name=".from-version" version="5.2.4"/> allow using "mask-closable" field""">>