Hook into dispatchTransaction from a plugin

Hi, I’m working on a plugin integrating codemirror with automerge.

Right now it overrides the dispatchTransaction callback to reconcile local and remote changes, which, among other things, dispatches new transactions: feat: Cleanup automerge codemirror plugin by dmaretskyi · Pull Request #4914 · dxos/dxos · GitHub

Is there any way to move this hook into the plugin as well, so it’s self-contained?

There can be only a single dispatch override, so that has to be set in the view configuration directly, not in a plugin.