mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Make edit preview pane extensible
Additional preview panes are tagged “$:/tags/EditPreview“. A dropdown is shown if there is more than one edit preview loaded.
This commit is contained in:
parent
df3e39d97a
commit
7daebba46b
@ -5,6 +5,8 @@ Body/Hint: Use [[wiki text|http://tiddlywiki.com/static/WikiText.html]] to add f
|
||||
Body/Placeholder: Type the text for this tiddler
|
||||
Body/Preview/Button/Hide: hide preview
|
||||
Body/Preview/Button/Show: show preview
|
||||
Body/Preview/Type: preview type:
|
||||
Body/Preview/Type/Output: output
|
||||
Field/Remove/Caption: remove field
|
||||
Field/Remove/Hint: Remove field
|
||||
Fields/Add/Button: add
|
||||
|
9
core/ui/EditTemplate/Preview/output.tid
Normal file
9
core/ui/EditTemplate/Preview/output.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/EditTemplate/body/preview/output
|
||||
tags: $:/tags/EditPreview
|
||||
caption: {{$:/language/EditTemplate/Body/Preview/Type/Output}}
|
||||
|
||||
<$set name="tv-tiddler-preview" value="yes">
|
||||
|
||||
<$transclude />
|
||||
|
||||
</$set>
|
@ -20,15 +20,24 @@ tags: $:/tags/EditTemplate
|
||||
|
||||
<$reveal state="$:/state/showeditpreview" type="match" text="yes">
|
||||
|
||||
<em class="tc-edit"><<lingo Hint>></em> <$button type="set" set="$:/state/showeditpreview" setTo="no"><<lingo Preview/Button/Hide>></$button>
|
||||
<em class="tc-edit"><<lingo Hint>></em> <$button type="set" set="$:/state/showeditpreview" setTo="no"><<lingo Preview/Button/Hide>></$button> <$list filter="[all[shadows+tiddlers]tag[$:/tags/EditPreview]!has[draft.of]butfirst[]limit[1]]" variable="listItem">
|
||||
<em class="tc-edit"><<lingo Preview/Type>></em> <$select tiddler="$:/state/editpreviewtype" default="$:/core/ui/EditTemplate/body/preview/output">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/EditPreview]!has[draft.of]]">
|
||||
<option value=<<currentTiddler>>>{{!!caption}}</option>
|
||||
</$list>
|
||||
</$select>
|
||||
|
||||
</$list>
|
||||
|
||||
<div class="tc-tiddler-preview">
|
||||
<div class="tc-tiddler-preview-preview">
|
||||
<$set name="tv-tiddler-preview" value="yes">
|
||||
|
||||
<$transclude />
|
||||
<$transclude tiddler={{$:/state/editpreviewtype}} mode="inline">
|
||||
|
||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/preview/output" mode="inline"/>
|
||||
|
||||
</$transclude>
|
||||
|
||||
</$set>
|
||||
</div>
|
||||
|
||||
<div class="tc-tiddler-preview-edit">
|
||||
|
Loading…
Reference in New Issue
Block a user