Skip to content

FileManager.insertIntoHeadingSection method

FileManager › insertIntoHeadingSection

Unofficial

Insert text at the start or end of a heading's section, after any leading or before any trailing blank lines.

Signature:

insertIntoHeadingSection(section: HeadingSectionParts, text: string, position: "append" | "prepend", separator: string): string

Parameters:

ParameterTypeDescription
sectionHeadingSectionPartsThe note's text split around the section.
textstringThe text to insert.
position"append" | "prepend"Whether to insert at the start or the end of the section.
separatorstringThe text placed between the inserted text and the section's existing text.

Returns: string — The note's whole new text.