Skip to content

BasesView.createFileForView method

BasesView › createFileForView

Official

Display the new note menu for a file with the provided filename and optionally a function to modify the frontmatter.

Signature:

createFileForView(baseFileName?: string, frontmatterProcessor?: (frontmatter: unknown, file: TFile) => void): Promise<void>

Parameters:

ParameterTypeDescription
baseFileName?stringThe filename of the base file.
frontmatterProcessor?(frontmatter: unknown, file: TFile) => voidA function to modify the frontmatter, called with the frontmatter and the created file.

Returns: Promise<void> — A promise that resolves when the file is created.

Since: 1.10.2