1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-17 19:09:55 +00:00

Focus editor when switching the preview on or off

This commit is contained in:
Jeremy Ruston 2023-09-19 16:08:47 +01:00
parent 276ba92429
commit bb3253fb21

View File

@ -15,9 +15,11 @@ shortcuts: ((preview))
<$reveal state=<<edit-preview-state>> type="match" text="yes" tag="span">
{{$:/core/images/preview-open}}
<$action-setfield $tiddler=<<edit-preview-state>> $value="no"/>
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
</$reveal>
<$reveal state=<<edit-preview-state>> type="nomatch" text="yes" tag="span">
{{$:/core/images/preview-closed}}
<$action-setfield $tiddler=<<edit-preview-state>> $value="yes"/>
<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/>
</$reveal>
</$let>