mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-17 17:59:45 +00:00
2adf09129d
Tada!
34 lines
757 B
Plaintext
34 lines
757 B
Plaintext
title: $:/core/ui/EditorToolbar/preview-type-dropdown
|
|
|
|
\define preview-type-button()
|
|
<$button tag="a">
|
|
|
|
<$action-setfield $tiddler="$:/state/editpreviewtype" $value="$(previewType)$"/>
|
|
|
|
<$action-deletetiddler
|
|
$tiddler=<<dropdown-state>>
|
|
/>
|
|
|
|
<$transclude tiddler=<<previewType>> field="caption" mode="inline">
|
|
|
|
<$view tiddler=<<previewType>> field="title" mode="inline"/>
|
|
|
|
</$transclude>
|
|
|
|
<$reveal tag="span" state="$:/state/editpreviewtype" type="match" text=<<previewType>> default="$:/core/ui/EditTemplate/body/preview/output">
|
|
|
|
<$entity entity=" "/>
|
|
|
|
<$entity entity="✓"/>
|
|
|
|
</$reveal>
|
|
|
|
</$button>
|
|
\end
|
|
|
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditPreview]!has[draft.of]]" variable="previewType">
|
|
|
|
<<preview-type-button>>
|
|
|
|
</$list>
|