Integrating Metadata menu with the Templater plugin to add metadata on a new note creation with a template. #307
hydraInsurgent
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @mdelobelle & fellow contributors,
Gathering quality metadata is one of the most tiring jobs, Metadata menu has simplified the process to a great extent and helped us in a lot of ways, I want to suggest a way that will ease out the process of collecting data even further. This is going to be linking the Metadata Menu with the Templater plugin to increase usability.
I am currently using await tp.system.prompt() in my metadata fields to ask me about metadata and some content I want to insert in my notes[attachment1]. The Templater prompt is amazing but the metadata menu is definitely better at prompts when it comes to the type of suggestions possible and UI for date etc.
On new note creation when templater loads javascript, I was also able to open the Field modal popup after prompts end via the below command on runtime and I can update these fields directly from the opened fields modal.
this.app.commands.executeCommandById('metadata-menu:open_fields_modal')
Fields Modal can get huge when you have so much metadata for a note it looks really cluttered with so many options. Most of the time we don't want to fill all the metadata that is in the fields modal when we just create a note. I feel it would be way better in my case and useful in simplifying capturing metadata a little further for many people if fields were asked one at a time sort of as a questionnaire only for the fields that we want to be asked. For example, one prompt for the Start date field asks us, "When are you starting this task" similarly one prompt for selecting a project with its own message, and so on.
I tried to execute the command for "field at cursor options" in a similar way as above but that didn't work as it is expected because the cursor is not on the same line as the command (also got a template parsing error which I am not sure about why).
So the solution which would work should read the line at which the command is placed and execute the field modal for that metadata field. Also, we need this to be able to await so we don't get 10 popups at once and rather one at a time when the template is running javascript on load.
Also, Finally, this function needs to return the output that will be the field value selected from the opened modal and place it after the metadata field as the Templater does.
I was thinking potential solution if there was a way to open the manage field at cursor view but from the javascript function and pass the metadata name as a parameter to specify which field we are at. Let me know your thoughts on this.
Attachments


Beta Was this translation helpful? Give feedback.
All reactions