It turned out not being exactly what I was looking for. The plugin works 
well, but it missing the selection from the dropdown. When you click on a 
previously used word in the dropdown menu, it doesn't add it to the list, 
but instead takes you to a new missing tiddler. There is also no 
autocomplete. 

I tried changing Jed's bookmark tag selector (because this one does have 
the above features) some more to make it add words within brackets to a 
'keywords' field. I managed to make the selection of a word within the 
dropdown menu, and the press on the add button, create a 'keyword' field. 
But i am struggling with also adding a word surrounded by brackets to that 
field. I think the ActionListopsWidget with the append operator should help 
me with this, but I am struggling with making it word. It just doesn't add 
anything to the 'keywords' field.
Any help would be greatly appreciated :)

'

\define lingo-base() $:/language/EditTemplate/
> \define tag-styles()
> background-color:$(backgroundColor)$;
> fill:$(foregroundColor)$;
> color:$(foregroundColor)$;
> \end
> \define tag-body-inner(colour,fallbackTarget,colourA,colourB)
> <$vars foregroundColor=<<contrastcolour target:"""$colour$""" 
> fallbackTarget:"""$fallbackTarget$""" colourA:"""$colourA$""" 
> colourB:"""$colourB$""">> backgroundColor="""$colour$""">
> <span style=<<tag-styles>> class="tc-tag-label">
> <$view field="keywords" format="text" />
> <$button message="tm-remove-tag" param={{!!title}} class="tc-btn-invisible 
> tc-remove-tag-button">&times;</$button>
> </span>
> </$vars>
> \end
> \define tag-body(colour,palette)
> <$macrocall $name="tag-body-inner" colour="""$colour$""" 
> fallbackTarget={{$palette$##tag-background}} 
> colourA={{$palette$##foreground}} colourB={{$palette$##background}}/>
> \end
> <div class="tc-edit-tags">
> <$fieldmangler>
> <$list filter="[all[current]!field:title[]sort[title]]" storyview="pop">
> <$macrocall $name="tag-body" colour={{!!color}} palette={{$:/palette}}/>
> </$list>
> <div class="tc-edit-add-tag">
>     <span class="tc-add-tag-name">
>         <$edit-text tiddler="$:/temp/NewKeyword" tag="input" default="" 
> placeholder={{$:/language/Odin/Keywords/Add/Placeholder}} 
> focusPopup=<<qualify "$:/state/popup/tags-auto-complete">> 
> class="tc-edit-texteditor tc-popup-handle"/>
>         </span> <$button popup=<<qualify 
> "$:/state/popup/tags-auto-complete">> class="tc-btn-invisible 
> tc-btn-dropdown" tooltip={{$:/language/EditTemplate/Tags/Dropdown/Hint}} 
> aria-label={{$:/language/EditTemplate/Tags/Dropdown/Caption}}>{{$:/core/images/down-arrow}}</$button>
>  
> <span class="tc-add-tag-button">
>         <$button
>             message="tm-add-field"
>             param=keywords
>             set="$:/temp/NewKeyword"
>             setTo=""
>             class=""
>         >
>             <$action-setfield
>                 $tiddler='$:/data/Odin/Keywords'
>                 $index={{$:/temp/NewKeyword}}
>                 $value=1
>             />
>             <<lingo Tags/Add/Button>>
>         </$button>
>     </span>
> </div>
> <div class="tc-block-dropdown-wrapper">
> <$reveal state=<<qualify "$:/state/popup/tags-auto-complete">> 
> type="nomatch" text="" default="">
> <div class="tc-block-dropdown">
> <$linkcatcher 
> set="!!keywords" setTo="{{$:/temp/NewTagName}}" 
> >
> <$list 
> filter="[[$:/data/Odin/Keywords]indexes[]search:title{$:/temp/NewKeyword}sort[]]">
> {{||$:/core/ui/Components/tag-link}}
> </$list>
> </$linkcatcher>
> </div>
> </$reveal>
> </div>
> </$fieldmangler>
> </div>




Op donderdag 14 mei 2020 18:04:15 UTC+2 schreef Odin Jorna:
>
>
>
> Thank you two so much! This is exactly what I was looking for : )
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/259e333a-66eb-40d7-9f90-cd0d202bc84a%40googlegroups.com.

Reply via email to