π The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.
Vue dockergolangkanbanknowledge-baseknowledge-managementmarkdownnote-takingnotesnotes-appnotionnuxtnuxtjsoffline-firstoidcpwaselfhostedssovuevuejswiki
Add spellcheck feature option for editor
Smaug6739c5fa0a7c7fc8
diff --git a/frontend/app/components/MarkdownEditor/EditorPreferences.vue b/frontend/app/components/MarkdownEditor/EditorPreferences.vueindex 7e5a25bb..04ebf80b 100644--- a/frontend/app/components/MarkdownEditor/EditorPreferences.vue+++ b/frontend/app/components/MarkdownEditor/EditorPreferences.vue@@ -7,6 +7,11 @@<AppSelect v-model="store.get('editorFontFamily').value" :items="EDITOR_FONTS" placeholder="Select theme" /><label for="category">Font size</label><input v-model="store.get('editorFontSize').value" type="number" min="1" max="100" placeholder="Select font size" />+ <div style="display: flex; align-items: center; gap: 10px; margin-top: 15px">+ <label for="category">Spell check</label>+ <AppToggle v-model="store.get('editorSpellCheck').value" />+ </div>+ <tag>Note: Enabling spell check can take effect after restarting the editor (reload the page)</tag></form></div></template>diff --git a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vueindex 45676644..6ad3e00f 100644--- a/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue+++ b/frontend/app/components/MarkdownEditor/LazyMarkdownEditor.vue@@ -193,6 +193,7 @@ function handleGridSelect(gridMarkdown: string) {view.focus();}+const snippets = usePreferences().get('snippets');const snippetListener = EditorView.updateListener.of(update => {if (!update.docChanged || !editorView.value) return;@@ -345,6 +346,11 @@ const state = EditorState.create({highlightSelectionMatches({}),EditorView.lineWrapping,EditorState.allowMultipleSelections.of(true),+ EditorView.contentAttributes.of({+ spellcheck: preferencesStore.get('editorSpellCheck').value ? 'true' : 'false',+ autocorrect: 'on',+ autocapitalize: 'on',+ }),],});onMounted(() => {diff --git a/frontend/app/composables/Preferences.ts b/frontend/app/composables/Preferences.tsindex 627beb08..18222ea9 100644--- a/frontend/app/composables/Preferences.ts+++ b/frontend/app/composables/Preferences.ts@@ -42,6 +42,7 @@ export const DEFAULT_PREFERENCES = {] as ANode<string>[],editorFontFamily: 'JetBrains Mono' as string,editorFontSize: 14 as number,+ editorSpellCheck: true as boolean,developerMode: false as boolean,};diff --git a/frontend/app/pages/dashboard/settings/_views/preferences.vue b/frontend/app/pages/dashboard/settings/_views/preferences.vueindex 4ff702df..abfe3140 100644--- a/frontend/app/pages/dashboard/settings/_views/preferences.vue+++ b/frontend/app/pages/dashboard/settings/_views/preferences.vue@@ -220,6 +220,13 @@ const options = ref<{ label: string; options: Option[] }[]>([{ label: '24', id: 24 },],},+ {+ label: 'Enable Spell Check',+ description: 'Enable spell check of browser in the editor. Changes may require a page reload to take effect.',+ type: 'toggle',+ key: 'editorSpellCheck',+ value: Boolean(preferencesStore.get('editorSpellCheck')),+ },],},{