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:

Parameter Type Description
location? TFolder | undefined The parent folder. Defaults to the configured new-file location.
filename? string | undefined The file name (without extension).
contents? string | undefined The initial file contents.

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