Using the Badges plugin you can create badges using
`[!!!KEY:content]`
The KEY has multiple variables like note, tldr, warning, etc.
I want to create a template which inserts the above text, and gives me list to choose one key, and ends with my cursor ready to edit the text
The ideal, but unrealistic example would be the prompt to insert admonitions from Admonitions plugin
Things I have tried
The only thing I succeded is
`[!!key:<% tp.file.cursor() %>]`
Can insert the template and leaves the cursor correctly.
I found that using
<%*
key = tp.system.suggester((key) => key, [“note”, “tldr”, “example”, “info”])
%>
gives me a list, but I don’t know how get it to do what I want.
As I understand, I have to set the KEY as a variable and have the prompt let me edit it.
This does nothing (want to tackle one thing at a time)
<%*
`[!!key:content]`
key = tp.system.suggester((key) => key, [“note”, “tldr”, “example”, “info”])
%>`
Had to edit some stuff to get it to work, but your answer pointed me in the right direction.
Had to add ‘await’ infront of the system command, and change some of the other stuff related to Badges syntax.