Skip to content

This is not CSAPI

Tino Didriksen edited this page Jun 6, 2023 · 2 revisions

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:

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:

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.

Clone this wiki locally