Skip to content

CanvasPluginInstance.createNewCanvasFile method

CanvasPluginInstance › createNewCanvasFile

Unofficial

Creates a new canvas file.

Signature:

createNewCanvasFile(location?: TFolder | undefined, filename?: string | undefined, contents?: string | undefined): Promise<TFile>

Parameters:

ParameterTypeDescription
location?TFolder | undefinedThe parent folder. Defaults to the configured new-file location.
filename?string | undefinedThe file name (without extension).
contents?string | undefinedThe initial file contents.

Returns: Promise<TFile>A promise resolving to the created file.