How to get a dropdown list of tags while typing in an edit text widget (like in the tag and field editor)

I want to have a dropdown list of tags when I start typing in an edit text widget.
I am using this edit text widget to add title and tags to the new tiddlers being created.
Here is the code
What I want is β€” when I start typing in the edit text widget for adding tags, a dropdown should appear with a list of tags (which can be limited by using some filters). I should be then able to add tags from those dropdown list to the newly created tiddler.

Is there a better way than using edit text for this purpose?

1 Like

Using tag-picker macro could be part of the answer – it provides the exact UI that you want.
Maybe it can be tweaked for your purpose, or maybe what you need can be extracted from its definition in $:/core/macros/tag-picker.

1 Like

I will take a look into this macro and see whether I can extract the parts needed. Thanks for sharing.

This sounds somewhat like the existing tag editor or the editor toolbar link button.

  • consider reusing or building your own based on these.

What do you mean when you use the edit text widget? Perhaps explain this more. Do you mean editing the tags field?

There are so many ways to do this, and different levels of automation. Perhaps there are other solutions?

I meant that I just type title and tag in the edit text widget at the top of my habit tracker tiddler linked in the OP and use a button to create a new habit tiddler using action widget. If you open the link, you can see it.

Since it is for the creation of new habits, i have to type the title and tag.

I will look at your suggestions and may be I will get some new ideas from them. Since it’s for typing of just three or four words, I don’t want to spend too much time behind automating it

Thanks for the reply @TW_Tones

Then its easy to add additional actions or settings to the new tiddler button to make this easy. Including tag selection, defaults or automation.

Try ctrl-L in the normal editor to search for a title. We could clone and modify this to only search for tabs and add them as tags when selected. Or store these in a temp location and used them to create new tiddlers.