Turn on/off Spellcheck? Standard and codemirror editors

I did not come at it from this perspective, you can tun off spell check provided by the browser altogether to stop it on the TW Editor.

Incidentally spell checkers often don’t work on codemirror - so if you use codemirror then you must use the preview that uses the default editor (text area) to spell check. Which can be viewed simultaneously with the codemirror editor, thus the default editor allowed spell check.

The OT asked could it be selectively turned off, my suggestions was use code mirror, which does not use the spell checker and selectively use the special preview to enable spellcheck. Which is kind of reverse solution.

I think what you are asking for is a reverse of a reverse, an in this case two reverses don’t make a forward.

Perhaps restate your requirement in full and we try and find a solution for that.

Folks, just to have a place to store this otherwise I may lose it. As per this link, you can turn on (or off) spell check changing the package.json file of TW adding
“chromium-args”: “–enable-spell-checking”, and I just found that you can also do:

chrome.settingsPrivate.setPref(‘browser.enable_spellchecking’, true) // false to disable
chrome.settingsPrivate.setPref(‘spellcheck.dictionaries’, [“en-US”, “de-DE”,“pt-BR”], “null”, ()=>{}) // set

in the TW desktop browser console (pressing F12, going to console and typing (or copy/paste) for those who are not used to a console). In the case you are enabling it, if you didn’t have the dictionary, it will be downloaded to the dictionaries’ folder (on Linux: ~/.config/TiddlyDesktop/Dictionaries/ )

These settings can be enabled via a JS file, but I don’t know exactly which one I could use right now, so I did it through the console, as I’m a little bit out of time to make more tests. Maybe it could help to find a solution to enable it via control panel. Rgds…

2 Likes

I have already created this preview to use for spell checking when codemirror is installed, because browser spell checkers don’t work with code mirror, and share it here;

  • In a tiddler you are editing in code mirror, select the preview “Spell Check Default Editor” click into the preview and spell check works in there.
  • By installing code mirror you effectively disable spell check unless you use this work around.
    • There may be in browser tools that work with codemirror.

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

1 Like

I may have hoped it was now possible to use the browser spell checker in code mirror, but it appears not to be so.

I can make use of my preview alternative above to access the standard tiddlywiki editor but I reply here to see if there has being any advance for code mirror. I have renamed the title to make it more obviouse.

Not that I’m aware of. I have a checkbox that flips between CodeMirror and a regular textarea. When CodeMirror is enabled, I don’t run the spellchecker. When it’s disabled, the regular browser spellchecker kicks in. Not ideal, but it works for the time being.

Thanks @CodaCoder may I ask how you implemented the invocation of the standard editor with code mirror running, last time I looked it’s got its tenticals through the core.

only if it’s trivial because it’s most likely similar to my above approach.

I am using tiddlywiki to write a book and the idea that spell check, the editor toobar and line numbers for example don’t work together is quite disappointing.

It’s part of my TiddlyBook. Put as simply as possible, the editor is either an $edit-text set to tag=textarea, or an $edit, bound to CodeMirror (in Control Panel).

Spellchecker:

CodeMirror:

Yes, I expected you used the same approach to me, unfortunatly it is difficult to reinstate the full text editor with code mirror installed and enabled, because the editor tool bar is not easy to restore.

  • Thanks for your answer, even if it supports the argument there reains a gap.
  • I may undertake another attempt to resolve this or submit a GITHub request against codeMirror.

Thanks again
Tones

I have never used it :astonished: