← Back to context

Comment by whywhywhywhy

2 years ago

Operating systems should be providing spellcheck to textboxes everywhere anyway.

Makes no sense every app rolling their own and not using my operating system dictionary with my own corrections.

Extremely frustrating every Electron app just rolls their own rubbish spellcheck, or doesn't have it at all.

I worked on spell checking for a web app. It would have been really, really nice if there was just an API to interact with the browser spell checker. We couldn't use the spell check you get in a text area, because like google docs, we rendered the text ourselves and had a custom context menu. And we had very good reasons for doing those things.

However, I think it would be difficult to create such an API without leaking information about what words are in a users custom dictionary (which could be used for fingerprinting). And allowing an app to add custom words would probably have some security implications.

Maybe if there was an API to open a spell check popup that was native to the browser and the only info you get is what word (if any) they chose to replace. But, besides having a suboptimal UX, that doesn't help you know which words to highlight as misspelled.

I've always thought that textboxes should have some sort of browser-to-os plugin feature, possibly on-demand.

I would love to edit my textboxes using real emacs somehow, even a popup window would be good.

That's an interesting take on things. Would you want your operating system to provide a web browser, pdf viewer, and spreadsheet as well?

To me it makes no sense that software does not interoperate very well. I think most of this is due to the historical evolution of computers and software. A spell checker used to take up an insane amount of memory, a browser is a competitive product, and interfaces for proper interaction have to be standardized worldwide, for which we still lack some kind of governmental body.

  • I wouldn't want the OS to do spell checking, but the OS having a config setting for which spell checker library and settings to use by default and for specific apps would be sweet, would it not?

    > A spell checker used to take up an insane amount of memory

    IMO they still do. At least anecdotally, with free software shipping with spell check that often makes up a hefty chunk of the file size.

    And even ignoring that, for every program with its own spell check, you have all of the redundant spell check data, and then your corrections/additions aren't even shared. Nevermind importing them on a freshly installed OS, syncing them between devices, futuristic things like that :)

    • I think this is the right solution: Have the API standardized, and perhaps even provide a default implementation out of the box, but fully support replacing it. Just like how, say, most systems ship an image viewer out of the box, but you can replace it with something else because the system has a standard file association system that a replacement can slot into.

  • Yeah, I suspect the grandparent comment meant that spellcheck (and perhaps other tools, like you listed) should be standardized. And thanks to the big cos (Apple and Microsoft) doing full vertical integration of their stack and calling it their “operating system”, that term is increasingly getting used for something more than just “the thing that operates your computational resources and safely exposes their APIs for developer use”.

    That said, it would be interesting to see more actual OS development that innovated on supporting/encouraging more standards, without getting too proprietary or centralized.

  • It's kinda-sorta possible on Linux distros, you know, with cliphist and all these little programs, but you have to do a lot of custom stitching, adding Firefox extensions to interoperate in such-and-such ways, and most programs don't have extensions. Until mainstream OSes make it a priority, I'll stay in my Emacs corner.

  • It's amazing how insanely slow OSes can be too install, even without providing some of these things. I feel like getting a new Debian docker image to apt update takes forever now compared to 1995.

    • I mean, `apt update` is probably more tied to the sheer number of packages (and sometimes repos) that it has to reload in its database than anything about what's actually installed. Maybe also a function of what's installed to check for upgradable packages and check dependency trees, but that still seems like its own problem.

  • >Would you want your operating system to provide a web browser, pdf viewer, and spreadsheet

    I mean I have little use for an OS without a web browser so yes. PDF viewer, Preview.app is infinitely better than Acrobat Reader so yes again. Spreadsheet I can give or take.

    The idea of multiple teams all rolling spellcheckers to build upon the same input boxes is absurd to me. Should be as integrated into the machine as the cursor and caret imho.

    • Well, neither Google’s cursor or caret are drawn by the system. They want ultimate control, not ultimate integration with the host browser/OS.

      Most electron and web editors that use ContentEditable should be able to use the OS spellcheck. Notion uses OS spell checking on web & Mac electron. I think on Windows there’s some weird issue we had to work around but I think we resumed using the OS dictionary, I’m not up to date on that.

  • Spell check is a universal composable text editing property, great job for the OS None of the other format viewer apps are