mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-16 06:44:50 +00:00
24 lines
881 B
Plaintext
24 lines
881 B
Plaintext
title: $:/core/ui/EditorToolbar/preview
|
|
tags: $:/tags/EditorToolbar
|
|
icon: $:/core/images/preview-open
|
|
custom-icon: yes
|
|
caption: {{$:/language/Buttons/Preview/Caption}}
|
|
description: {{$:/language/Buttons/Preview/Hint}}
|
|
condition: [<targetTiddler>]
|
|
button-classes: tc-text-editor-toolbar-item-start-group
|
|
shortcuts: ((preview))
|
|
|
|
\whitespace trim
|
|
<$let
|
|
edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
|
|
>
|
|
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
|
|
{{$:/core/images/preview-open}}
|
|
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
|
|
</$reveal>
|
|
<$reveal state=<<edit-preview-state>> type="nomatch" text="yes" tag="span">
|
|
{{$:/core/images/preview-closed}}
|
|
<$action-setfield $tiddler=<<edit-preview-state>> $value="yes"/>
|
|
</$reveal>
|
|
</$let>
|