MCPcopy Create free account
hub / github.com/chhoumann/quickadd / createFolderTemplateChoice

Function createFolderTemplateChoice

src/engine/runTemplateFromFolder.ts:37–45  ·  view source on GitHub ↗
(templatePath: string)

Source from the content-addressed store, hash-verified

35 * and to the one-page input form (which would omit the name field).
36 */
37export function createFolderTemplateChoice(templatePath: string): ITemplateChoice {
38 const choice = new TemplateChoice(templateDisplayName(templatePath));
39 choice.templatePath = templatePath;
40 // Creating a brand-new note from a template — land in it, like the user expects.
41 choice.openFile = true;
42 choice.fileNameFormat = { enabled: true, format: VALUE_SYNTAX };
43 choice.discoverExistingNotesBeforeCreate = true;
44 return choice;
45}
46
47/** Whether at least one template folder is configured (empty = whole vault, which we refuse). */
48export function hasConfiguredTemplateFolders(plugin: QuickAdd): boolean {

Callers 3

runTemplateHandlerFunction · 0.90
runTemplateFromFolderFunction · 0.85

Calls 1

templateDisplayNameFunction · 0.85

Tested by

no test coverage detected