Skip to content

FileManager.insertIntoFile method

FileManager › insertIntoFile

Unofficial

Insert text into a file.

Signature:

insertIntoFile(file: TFile, text: string, position?: "append" | "prepend" | undefined): Promise<void>

Parameters:

ParameterTypeDescription
fileTFileThe file to insert into.
textstringThe text to insert.
position?"append" | "prepend" | undefinedWhere to insert the text.

Returns: Promise<void>A promise that resolves when the text is inserted.