Template Selector


Select a [Template] from a specified tag with a GUI!


In the plugin settings,

Select the tag that contains the desired templates.

Then, simply use {Template Selector}!


Tag with Templates

async insertText(app) {
// Fetch the templates from the specified tag
const noteHandles = await app.filterNotes({ tag: app.settings["Tag with Templates"] });
console.log("noteHandles:", noteHandles); // debug log
// Convert the note handles to a format suitable for the dropdown menu
const templateOptions = => ({
label:, // display the note title in the dropdown menu
value: noteHandle.uuid // return the note UUID when the option is selected
console.log("templateOptions:", templateOptions); // debug log
// Prompt the user to select a template
const result = await app.prompt("Select a template", {
inputs: [
type: "radio",
options: templateOptions
console.log("result:", result); // debug log
if (result) {
const selectedTemplateUUID = result;
console.log("selectedTemplateUUID:", selectedTemplateUUID); // debug log
// Fetch the content of the selected template
const selectedTemplateContent = await app.getNoteContent({ uuid: selectedTemplateUUID });
console.log("selectedTemplateContent:", selectedTemplateContent); // debug log
// Insert the selected template into the current note
return null;
} else {
// User canceled