mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-08-30 04:52:46 +00:00
23 lines
1.6 KiB
Plaintext
23 lines
1.6 KiB
Plaintext
title: $:/core/ui/EditTemplate/tags
|
|
tags: $:/tags/EditTemplate
|
|
|
|
\define tag-styles()
|
|
background-color:$(backgroundColor)$;
|
|
\end
|
|
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" storyview="pop" itemClass="tw-tag-editor-label"><$set name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">×</$button></span></$set>
|
|
</$list></div>
|
|
|
|
<div class="tw-add-tag">//Add a new tag:// <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<<qualify "$:/state/tagsAutoComplete">> class="tw-edit-texteditor"/></span> <$button popup=<<qualify "$:/state/tagsAutoComplete">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
|
|
|
|
<div class="tw-block-dropdown-wrapper">
|
|
<$reveal state=<<qualify "$:/state/tagsAutoComplete">> type="nomatch" text="" default="">
|
|
<div class="tw-block-dropdown">
|
|
<$linkcatcher set="$:/NewTagName" setTo="" message="tw-add-tag"><$list filter="[!is[shadow]tags[]search{$:/NewTagName}sort[title]]"><$link><$set name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text"/></span></$set></$link>
|
|
</$list>
|
|
</$linkcatcher>
|
|
</div>
|
|
|
|
</$reveal>
|
|
</div>
|
|
</$fieldmangler>
|