1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-10-02 17:00:45 +00:00
TiddlyWiki5/core/ui/EditTemplate.tid
Jeremy Ruston 0fc3c0d4a3 Extend field editor to allow removal and adding of fields
Still pretty rough looking
2013-06-04 12:03:53 +01:00

40 lines
2.0 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>
<$fieldmangler>
<$fieldlist exclude="title tags text modified modifier draft.title draft.of">
<span class="tw-edit-field-name"><$info type="currentField"/>:</span> <span class="tw-edit-field-value"><$edit/></span> <span class="tw-edit-field-remove"><$button message="tw-remove-field" class="">remove</$button></span>
</$fieldlist>
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit tiddler="$:/NewFieldName" type="input" default=""/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
</$fieldmangler>