mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-20 00:34:50 +00:00
3287cf56bb
* make editor-preview open on a per-tiddler basis * use qualified state for showeditpreview * fix added p tag * Make tiddler-preview per-tiddler configurable * Create ShowEditPreviewPerTiddler.tid * Update ControlPanel.multids * Create ShowEditPreviewPerTiddler.tid * Update body.tid * Update ShowEditPreviewPerTiddler.tid * Update ControlPanel.multids * Delete ShowEditPreviewPerTiddler.tid * Delete ShowEditPreviewPerTiddler.tid * Create Hidden Setting ShowEditPreviewPerTiddler.tid
57 lines
1.9 KiB
Plaintext
57 lines
1.9 KiB
Plaintext
title: $:/core/ui/EditTemplate/body
|
|
tags: $:/tags/EditTemplate
|
|
|
|
\define lingo-base() $:/language/EditTemplate/Body/
|
|
\define config-visibility-title()
|
|
$:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
|
\end
|
|
|
|
\define importFileActions()
|
|
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
|
\end
|
|
|
|
<$list filter="[all[current]has[_canonical_uri]]">
|
|
|
|
<div class="tc-message-box">
|
|
|
|
<<lingo External/Hint>>
|
|
|
|
<a href={{!!_canonical_uri}}><$text text={{!!_canonical_uri}}/></a>
|
|
|
|
<$edit-text field="_canonical_uri" class="tc-edit-fields" tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"></$edit-text>
|
|
|
|
</div>
|
|
|
|
</$list>
|
|
|
|
<$set name="edit-preview-state" value={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}>
|
|
<$list filter="[all[current]!has[_canonical_uri]]">
|
|
<$vars 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>> ><$reveal stateTitle=<<edit-preview-state>> type="match" text="yes">
|
|
<div class="tc-tiddler-preview">
|
|
|
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
|
|
|
<div class="tc-tiddler-preview-preview">
|
|
|
|
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline">
|
|
|
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/preview/output" mode="inline"/>
|
|
|
|
</$transclude>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</$reveal>
|
|
|
|
<$reveal stateTitle=<<edit-preview-state>> type="nomatch" text="yes">
|
|
|
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
|
|
|
</$reveal>
|
|
</$dropzone>
|
|
</$vars>
|
|
</$list>
|
|
</$set>
|