1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-17 01:14:21 +00:00
TiddlyWiki5/core/ui/EditTemplate.tid
Jeremy Ruston ac879b165d Extend the edit template to include field editors
Not yet complete - we can't add or remove fields, and we need to
trigger type-specific editors for certain field types. And the layout
is a bit rubbish at the moment
2013-06-02 23:22:16 +01:00

35 lines
1.4 KiB
Plaintext

title: $:/core/ui/EditTemplate
modifier: JeremyRuston
<span class="tw-tiddler-controls title"> <$button message="tw-delete-tiddler" class="btn-invisible">{{$:/core/images/delete-button}}</$button> <$button message="tw-cancel-tiddler" class="btn-invisible">{{$:/core/images/cancel-button}}</$button> <$button message="tw-save-tiddler" class="btn-invisible">{{$:/core/images/done-button}}</$button> </span>
<$view field="title"/>
@@.title
<$edit field="draft.title"/>
@@
<div class="tw-tiddler-help">Type tags separated with spaces, &#91;&#91;using double square brackets&#93;&#93; if necessary</div>
<$edit field="tags"/>
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
<span class="tw-tiddler-help">Use WikiText to add formatting, images, and dynamic features</span> <$button type="set" set="$:/ShowEditPreview" setTo="no" >Hide preview</$button>
<div class="tw-tiddler-preview">
<div class="tw-tiddler-preview-preview">
<$view field="text" format="wikified"/>
</div>
<div class="tw-tiddler-preview-edit">
<$edit field="text"/>
</div>
</div>
</$reveal>
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
<span class="tw-tiddler-help">Use WikiText to add formatting, images, and dynamic features</span> <$button type="set" set="$:/ShowEditPreview" setTo="yes" >Show preview</$button>
<$edit field="text"/>
</$reveal>
<$fieldlist exclude="title tags text draft.title draft.of">
<$info type="currentField"/>: <$edit/>
</$fieldlist>