mirror of
https://github.com/ozntel/oz-calendar.git
synced 2026-07-22 07:40:24 +00:00
YAML Key for new notes
This commit is contained in:
parent
91a1727fef
commit
afcd66577b
2 changed files with 15 additions and 1 deletions
|
|
@ -70,7 +70,12 @@ export class CreateNoteModal extends Modal {
|
|||
---
|
||||
`;
|
||||
// Create the MD File and close the modal
|
||||
await createNewMarkdownFile(this.plugin, defFolder, newFileName, defaultNewFileText);
|
||||
await createNewMarkdownFile(
|
||||
this.plugin,
|
||||
defFolder,
|
||||
newFileName,
|
||||
this.plugin.settings.dateSource === 'yaml' ? defaultNewFileText : ''
|
||||
);
|
||||
thisModal.close();
|
||||
} else {
|
||||
new Notice('Folder couldnt be found in the Vault');
|
||||
|
|
|
|||
|
|
@ -185,6 +185,15 @@ export class OZCalendarPluginSettingsTab extends PluginSettingTab {
|
|||
|
||||
containerEl.createEl('h2', { text: 'New Note Settings' });
|
||||
|
||||
containerEl.createEl('p', {
|
||||
text: `
|
||||
The plugin will add the YAML key and date to the newly created note using the date format provided above
|
||||
if Date Source is YAML. However, auto YAML key generation for the notes is going to be disabled if you use
|
||||
File Name as date source.
|
||||
`,
|
||||
cls: 'setting-item-description',
|
||||
});
|
||||
|
||||
new Setting(this.containerEl)
|
||||
.setName('Default Folder Location')
|
||||
.setDesc('Select the default folder, under which the new files should be saved when use plugin + icon')
|
||||
|
|
|
|||
Loading…
Reference in a new issue