-
Notifications
You must be signed in to change notification settings - Fork 1
This is not CSAPI
CSAPI/CGAPI/CHAPI/etc is the native tooling, that Microsoft basically doesn't want to support going forward.
The code at https://github.com/GrammarSoft/proofing-gasmso uses these newer differently-abled APIs:
- Microsoft Office: https://docs.microsoft.com/office/dev/add-ins/
- Google Docs: https://developers.google.com/apps-script/
What you get in terms of UI is a ~300px fixed-width sidebar and fixed-size popup windows. And nothing else. Screenshots of the Google Docs and Office Online versions: https://imgur.com/a/syDifk3
Modern add-ins cannot affect how the document is displayed, beyond setting the selection - any red underline in the screenshots is from the host itself, not the add-in. The add-in only sets the gray selection box.
This sucks, and I've opened feature requests at both Google and MS about it:
- https://issuetracker.google.com/issues/37938468
- https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/proofing-tool-api-spelling-grammar-punctuation-hyphenation/idi-p/3052575
- ( http://web.archive.org/web/20201021221732/https://officespdev.uservoice.com/forums/224641-feature-requests-and-feedback/suggestions/10475778-proofing-tool-api )
Modern add-ins are also only HTML5, so any communication with servers must be via HTTP - luckily this includes WebSockets, but it's still a hindrance to running the tools offline. The offline version would have to run a full HTTP daemon locally and the add-in would need to be directed at some magic local port. It's doable, but fragile.
So, you don't get right-click menus, you don't get underlining, you don't get quick pop-up modals per error, you can't query the locale of text, you can't set the locale of text. And because it's not a native app, you can't detect the keyboard language.
The upside is that the add-ins work cross-platform. The Office add-in works on Windows, Mac, and iPad.