Skip to content

CanvasPluginInstance.createNewCanvasFile method

CanvasPluginInstance › createNewCanvasFile

Unofficial

Creates a new canvas file.

Signature:

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

Parameters:

ParameterTypeDescription
location?TFolderThe parent folder. Defaults to the configured new-file location.
filename?stringThe file name (without extension).
contents?stringThe initial file contents.

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