mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-14 04:00:28 +00:00
c185e373c5
* make toolbar, editor and preview display: grid * correct display of bitmap editor * grid-area: toolbar not only when preview is shown * use dedicated classes and tc-grid and no brittle CSS selectors * no need for width: 100% * cleanup style definitions * use semantic classnames
46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
title: $:/core/ui/EditTemplate/body/default
|
|
|
|
\function edit-preview-state()
|
|
[{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] +[get[text]] :else[[no]]
|
|
\end
|
|
|
|
\define config-visibility-title()
|
|
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
|
\end
|
|
|
|
\define importFileActions()
|
|
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
|
\end
|
|
|
|
\whitespace trim
|
|
<$let
|
|
importTitle=<<qualify $:/ImportImage>>
|
|
importState=<<qualify $:/state/ImportImage>> >
|
|
<$dropzone importTitle=<<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=<<importFileActions>> >
|
|
<div>
|
|
<div class={{{ [function[edit-preview-state]match[yes]then[tc-tiddler-preview]else[tc-tiddler-preview-hidden]] [[tc-tiddler-editor]] +[join[ ]] }}}>
|
|
|
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
|
|
|
<$list filter="[function[edit-preview-state]match[yes]]" variable="ignore">
|
|
|
|
<div class="tc-tiddler-preview-preview" data-tiddler-title={{!!draft.title}} data-tags={{!!tags}}>
|
|
|
|
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline">
|
|
|
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/preview/output" mode="inline"/>
|
|
|
|
</$transclude>
|
|
|
|
</div>
|
|
|
|
</$list>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</$dropzone>
|
|
|
|
</$let>
|