2016-04-22 07:36:29 +00:00
|
|
|
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>]
|
2016-04-29 16:18:58 +00:00
|
|
|
button-classes: tc-text-editor-toolbar-item-start-group
|
2016-04-22 07:36:29 +00:00
|
|
|
shortcuts: ((preview))
|
|
|
|
|
2022-04-06 07:27:05 +00:00
|
|
|
\whitespace trim
|
2023-10-06 20:49:02 +00:00
|
|
|
<$let
|
|
|
|
edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
|
|
|
|
>
|
2021-10-28 18:17:15 +00:00
|
|
|
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
|
2016-04-22 07:36:29 +00:00
|
|
|
{{$:/core/images/preview-open}}
|
2021-10-28 18:17:15 +00:00
|
|
|
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
|
2023-10-06 20:49:02 +00:00
|
|
|
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
|
2016-04-22 07:36:29 +00:00
|
|
|
</$reveal>
|
2021-10-28 18:17:15 +00:00
|
|
|
<$reveal state=<<edit-preview-state>> type="nomatch" text="yes" tag="span">
|
2016-04-22 07:36:29 +00:00
|
|
|
{{$:/core/images/preview-closed}}
|
2021-10-28 18:17:15 +00:00
|
|
|
<$action-setfield $tiddler=<<edit-preview-state>> $value="yes"/>
|
2023-10-06 20:49:02 +00:00
|
|
|
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
|
2016-04-22 07:36:29 +00:00
|
|
|
</$reveal>
|
2023-10-06 20:49:02 +00:00
|
|
|
</$let>
|