Turn off Spellcheck?

Can spellcheck be toggled programmatically? Red squiggles are a bit distracting.

Currently, I right-click and press ‘g’ to toggle spellcheck on each textarea. It would be convenient to toggle spellcheck off once while doing a lot of macro editing.

Isn’t spellcheck a function of your browser? In chromium it’s under settings / languages . But if you can toggle yours with “g”, then maybe you have some other browser or maybe an extension installed?

1 Like

No extensions. Right click in the text area brings up a context menu with an option to toggle spell check with an accelerator key of “g” in my case. Firefox.

Turning spell check off in the browser turns it off globally which I don’t want. I’d like to turn it off just for the wiki I’m editing and was wondering if there was something like a css or HTML property for it.


It looks to me as if the spell check attribute is not a feature of CSS - only HTML which is to be expected since CSS should change appearance and layout but not functionality or content although that line has been blurred a little.

My test word in the text area I am editing right now is below.


I added spellcheck=“false” in the HTML for this editor whilst I was using it using Mozilla developer tools and observed that the spell checker no longer detected the word baad. Of course this was only a temporary change and one that only affects me locally.

If you can find out how to permanently change the HTML for the editor element in Tiddlywiki it might be the solution for you.

Regards the CSS route, it would seem there are experiments in this direction but it seems that browser support is currently not there. This fix would of course merely be a method for turning off the visual indications of a mis spelling but would not turn off the spell checker itself.

Thanks for that shortcut. I didn’t know about that. I usually need to do all the menu-clicking.

Thanks for digging up the info. … I didn’t know about that. After a very short test, it seems to be possible to enable the browser spell-checker on a per DOM element level.

So it should be straight forward to create a new toolbar button and even a keyboard shortcut, that does exactly that.

We would also need to create a small visual indicator, that the spellchecker is off. … Sometimes I do have text without a typo … sometimes :wink:

1 Like

I did create a GH issue: https://github.com/Jermolene/TiddlyWiki5/issues/6927 so it won’t be forgotten.

I’m not promising anything, but I would also appreciate this function quite a bit.

May be not a editor toolbar setting. May be page-toolbar setting. It would be possible to make that setting persistent. So the status will be saved and reloaded.

I would make the “per tiddler” setting temporary. It has the potential to create a lot of redundant state tiddlers, that are only needed for a short time period, but users will forget about them so they will be bloat

@ all: What do you think?

@pmario This is the direction I was heading if it turned out to be possible.

I would go with a global per-wiki setting rather than a per-tiddler setting. Isn’t that how the preview toggle works in the edit template? There would need to be an indicator above or below the textarea, and maybe in the Settings also.

100% agree.   

Of course the alternative approach is to have an additional dictionary to which you add terms found in macros so they are no longer highlighted as misspellings. Such dictionaries can be toggled on/off in the browser and can be used simultaneously with other dictionaries.

Perhaps one day in the future we could add custom addon dictionaries to tiddlywiki itself?, but until then looking at the code highlighting options may offer some relief, especially when previewing code.

I’m pretty sure, that the FireFox dictionary can’t add new terms. … Buf I’ve had a look, how to create custom browser dictionaries. Most browsers seem to use the “hunspell” library, which needs a “special” format that uses 2 different files. 1 file with the “word list” and 1 file with some “grammer rules”. …

The tricky part is, to create those 2 files in a convenient way. eg: Have a maintainable, human readable source structure PLUS a “build stack” that turns this structure into the requested result.

I posted a demo to enable/disable spellchecking here: https://amreus.tiddlyhost.com

The toggle affects any text-edit widget. It is possible the feature will be added officially soon.

It requires the 3 modified core tiddlers as listed. The state is saved with the wiki. There is no ControlPanel or other user interface other than the checkbox in the Customizations tiddler.

Questions? Issues?

1 Like

Can you document its effect when using codemirror please?

In short I can not answer that because I don’t know at this time.

I briefly looked at the codemirror plugin this morning and it looks to me like codemirror replaces the piece of tiddlywiki that makes the textarea, and so I think the changes I made will have no effect when used with codemirror. Put another way, the codemirror plugin would need to be modified to use the spellchecking toggle.

I think it more likely we need to;

  • Modify the spell check to cope with code mirror edit fields.
  • Just allow an option to view the same tiddler in a standard edit view for spell check.
  • Create a custom preview which is in fact the classic editor in which spell check can occur.

Create a custom preview which is in fact the classic editor in which spell check can occur.

edit-template-spell-check preview.json (621 Bytes)

You could make an alternate edit template that does the same thing.

Here I created a new editor preview that uses a simple edit text area, if using code mirror select preview “Spell check default editor” and click inside and you can use the standard browser spell checker. I also recommend ## Hidden Setting: Show Edit Preview per Tiddler

Is it possible to have spellcheck in the preview window on while it is off in the main editor window?

In my example with the special preview, the spell check is not operating on the codemirror editor, but does in the preview window, so gives you this result.

Hi Tony
I use the default TW editor and your solution does not work for me! Is there anything wrong in my side?