Insert Into Note
This action inserts plain text or a Templater template at a specified line number into the note of the button.
interface InsertIntoNoteButtonAction { type: 'insertIntoNote'; line: number | RelativeLineNumberExpression; // the line number to insert the text at value: string; // the text to insert or the path to the Templater template templater?: boolean; // if true, the value is a path to a Templater template}
If templater
is true
, the value
field is treated as a path to a Templater template.
If templater
is false
or not specified, the value
field is treated as plain text.
This button action supports relative line numbers.
Example
Section titled “Example”This button inserts the text “Hello, world!” at line 3 of the note.
```meta-bind-buttonstyle: primarylabel: Insert Into Noteaction: type: insertIntoNote line: 3 value: "Hello, world!" templater: false```
The below example adds the line “Hello” below the button using relative line numbers.
```meta-bind-buttonlabel: Insert with relative line numbersstyle: defaultaction: type: insertIntoNote line: selfEnd + 1 value: Hello```