diff --git a/core/ui/EditTemplate/body/default.tid b/core/ui/EditTemplate/body/default.tid index a2128efb0..68133d48e 100644 --- a/core/ui/EditTemplate/body/default.tid +++ b/core/ui/EditTemplate/body/default.tid @@ -1,5 +1,9 @@ title: $:/core/ui/EditTemplate/body/default +\function edit-preview-state() +[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[] +[get[text]] :else[[no]] +\end + \define config-visibility-title() $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$ \end @@ -10,15 +14,16 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$ \whitespace trim <$let - edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[] }}} importTitle=<> importState=<> > <$dropzone importTitle=<> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<> > -<$reveal stateTitle=<> type="match" text="yes" tag="div"> -
+
+
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/> +<$list filter="[function[edit-preview-state]match[yes]]" variable="ignore"> +
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline"> @@ -29,13 +34,12 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
+ +
- -<$reveal stateTitle=<> type="nomatch" text="yes" tag="div"> +
-<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/> - - + diff --git a/core/ui/EditorToolbar/preview.tid b/core/ui/EditorToolbar/preview.tid index 106b28d3c..3c8cef505 100644 --- a/core/ui/EditorToolbar/preview.tid +++ b/core/ui/EditorToolbar/preview.tid @@ -9,11 +9,17 @@ 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[] }}} +> <$reveal state=<> type="match" text="yes" tag="span"> {{$:/core/images/preview-open}} <$action-setfield $tiddler=<> $value="no"/> +<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/> <$reveal state=<> type="nomatch" text="yes" tag="span"> {{$:/core/images/preview-closed}} <$action-setfield $tiddler=<> $value="yes"/> +<$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/> +