Create Note
The create note action creates a new empty note in the specified location.
interface CreateNoteButtonAction { type: 'createNote'; fileName: string; // the name of the new note folderPath?: string; // the folder path where the note should be created, if not specified the note will be created in the root of the vault openNote?: boolean; // if true, the note will be opened after creation openIfAlreadyExists?: boolean; // whether to open the note if it already exists instead of creating a new one with an incremented name}
When a note with the same name already exists in the specified location, the note will be created with a running number appended to the name.
For example, if a note with the name Note
already exists, the new note will be named Note 1
.
Example
This button will create a new note named New Note
in the My Folder
folder.
If a note with the same name already exists, the new note will be named New Note 1
.
```meta-bind-buttonstyle: primarylabel: Create Noteaction: type: createNote folderPath: "My Folder" fileName: "New Note" openNote: false```