Disable spellcheck on a single note?

I’m trying to learn Latin

I write some words and phrases in Latin (obviously). It would be nice if there were some way to turn off the spellcheckning of those notes.

Any way to do that in Obsidian?

There used to be a way to style the spellcheck underline with CSS, but I don’t think it’s possible anymore. It would be nice to set a cssClass for no spellcheck.

Not exactly elegant, but you could create two Templater files, say spell-OFF and spell-ON, and set them to hotkeys. Turn spellcheck off when you are studying Latin, turn it back on when you are done.

Contents of spell-OFF note →

<%*
// turn off spellcheck
this.app.vault.setConfig("spellcheck", false);
%>

and the contents of spell-ON note →

<%*
// turn on spellcheck
this.app.vault.setConfig("spellcheck", true);
%>
1 Like

That solution is pure genius. :pray:

2 Likes

It’s a 50/50 tossup if I would remember to turn it back on after turning it off, but thank you. :grin:

UPDATE: All that Templater business and there’s a command already: Toggle spellcheck. :person_facepalming:t4: There’s almost always a command.

1 Like

That’s a great workaround. Thank you!

I’ll try that.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.