feat: per-note spellcheck (#815)

* feat: per-note spellcheck control

* fix: remove fill from svg

* feat: move spellcheck pref into defaults preferences section

* fix: use faded css class instead of opacity

* feat: plus editor 1.6.0
This commit is contained in:
Mo
2022-01-14 14:32:16 -06:00
committed by GitHub
parent 2b12f7f0e9
commit 063c3b2fee
15 changed files with 265 additions and 106 deletions

View File

@@ -25,9 +25,6 @@ export const Tools: FunctionalComponent<Props> = observer(
const [marginResizers, setMarginResizers] = useState(() =>
application.getPreference(PrefKey.EditorResizersEnabled, true)
);
const [spellcheck, setSpellcheck] = useState(() =>
application.getPreference(PrefKey.EditorSpellcheck, true)
);
const toggleMonospaceFont = () => {
setMonospaceFont(!monospaceFont);
@@ -39,11 +36,6 @@ export const Tools: FunctionalComponent<Props> = observer(
application.setPreference(PrefKey.EditorResizersEnabled, !marginResizers);
};
const toggleSpellcheck = () => {
setSpellcheck(!spellcheck);
application.setPreference(PrefKey.EditorSpellcheck, !spellcheck);
};
return (
<PreferencesGroup>
<PreferencesSegment>
@@ -67,17 +59,6 @@ export const Tools: FunctionalComponent<Props> = observer(
checked={marginResizers}
/>
</div>
<HorizontalSeparator classes="mt-5 mb-3" />
<div className="flex items-center justify-between">
<div className="flex flex-col">
<Subtitle>Spellcheck</Subtitle>
<Text>
May degrade performance, especially with long notes. This option only controls
spellcheck in the Plain Editor.
</Text>
</div>
<Switch onChange={toggleSpellcheck} checked={spellcheck} />
</div>
</div>
</PreferencesSegment>
</PreferencesGroup>