diff --git a/manifest.json b/manifest.json index 8dbeb6e..383591b 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "folder-notes", "name": "Folder notes", - "version": "1.7.32", + "version": "1.7.33", "minAppVersion": "0.15.0", "description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.", "author": "Lost Paul", diff --git a/src/functions/folderNoteFunctions.ts b/src/functions/folderNoteFunctions.ts index dfa48af..f68d9b9 100644 --- a/src/functions/folderNoteFunctions.ts +++ b/src/functions/folderNoteFunctions.ts @@ -140,8 +140,8 @@ export async function createFolderNote(plugin: FolderNotesPlugin, folderPath: st const folder = plugin.app.vault.getAbstractFileByPath(folderPath); if (!(folder instanceof TFolder)) return; - addCSSClassToTitleEL(plugin, path, 'is-folder-note', true); - addCSSClassToTitleEL(plugin, folder.path, 'has-folder-note'); + addCSSClassToTitleEL(path, 'is-folder-note', true); + addCSSClassToTitleEL(folder.path, 'has-folder-note'); } export async function turnIntoFolderNote(plugin: FolderNotesPlugin, file: TFile, folder: TFolder, folderNote?: TFile | null | TAbstractFile, skipConfirmation?: boolean) { @@ -186,8 +186,8 @@ export async function turnIntoFolderNote(plugin: FolderNotesPlugin, file: TFile, } await plugin.app.fileManager.renameFile(file, path); - addCSSClassToTitleEL(plugin, path, 'is-folder-note', true); - addCSSClassToTitleEL(plugin, folder.path, 'has-folder-note'); + addCSSClassToTitleEL(path, 'is-folder-note', true); + addCSSClassToTitleEL(folder.path, 'has-folder-note'); if (plugin.activeFolderDom) { plugin.activeFolderDom.removeClass('fn-is-active'); diff --git a/src/main.ts b/src/main.ts index eaaef10..2988e7a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -118,9 +118,12 @@ export default class FolderNotesPlugin extends Plugin { handleDelete(file, this); })); - this.registerMarkdownCodeBlockProcessor('folder-overview', (source: string, el: HTMLElement, ctx: MarkdownPostProcessorContext) => { - this.handleOverviewBlock(source, el, ctx); - }); + const folderOverviewEnabled = this.app.plugins.getPlugin('folder-overview') + if (!folderOverviewEnabled) { + this.registerMarkdownCodeBlockProcessor('folder-overview', (source: string, el: HTMLElement, ctx: MarkdownPostProcessorContext) => { + this.handleOverviewBlock(source, el, ctx); + }); + } if (this.app.workspace.layoutReady) { // loadFileClasses(undefined, this); @@ -155,7 +158,7 @@ export default class FolderNotesPlugin extends Plugin { // @ts-ignore const editMode = view.editMode ?? view.sourceMode ?? this.app.workspace.activeEditor?.editMode; if (!editMode) { return; } - + // console.log('editMode', editMode); const plugin = this;