diff --git a/packages/obsidian-plugin/src/index.ts b/packages/obsidian-plugin/src/index.ts index de6c1de0..ab2d2385 100644 --- a/packages/obsidian-plugin/src/index.ts +++ b/packages/obsidian-plugin/src/index.ts @@ -1,5 +1,5 @@ import logoSvg from '../logo.svg'; -import { Plugin, Menu, PluginManifest, App } from 'obsidian'; +import { Plugin, Menu, PluginManifest, App, Notice } from 'obsidian'; import { LintConfig, Linter, Suggestion } from 'harper.js'; import { LocalLinter, SuggestionKind, WorkerLinter } from 'harper.js'; import { linter } from './lint'; @@ -81,6 +81,11 @@ export default class HarperPlugin extends Plugin { } async onload() { + if (typeof Response == 'undefined') { + new Notice('Please update your Electron version before running Harper.', 0); + return; + } + const data = await this.loadData(); await this.initializeFromSettings(data); this.registerEditorExtension(this.editorExtensions); diff --git a/packages/web/src/routes/docs/integrations/obsidian/+page.md b/packages/web/src/routes/docs/integrations/obsidian/+page.md index 6f3a3a8a..a53c9508 100644 --- a/packages/web/src/routes/docs/integrations/obsidian/+page.md +++ b/packages/web/src/routes/docs/integrations/obsidian/+page.md @@ -41,10 +41,16 @@ The Harper plugin is a powerful, privacy-first grammar and spell-checking tool d ## Installation Guide -1. Open Obsidian and navigate to **Settings → Community Plugins → Browse**. -2. Search for "Harper" in the plugin library. -3. Click "Install" and then "Enable." -4. Start typing in your notes—Harper will automatically highlight errors as you go! +- Open Obsidian and navigate to **Settings → Community Plugins → Browse**. +- Search for "Harper" in the plugin library. +- Click "Install" and then "Enable." +- Start typing in your notes—Harper will automatically highlight errors as you go! + +--- + +:::warning[Notice] +Harper expects an up-to-date version of Electron. If you have issues, [reinstall Obsidian](https://obsidian.md/download) or otherwise update your Electron version. +::: ## Future Development