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
1 changed files with 2 additions and 0 deletions

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>