scmJS docs

Plugins

Writing one, the shape of the API, and a tour of the plugins the editor ships with.

scmJS loads third-party code — a plugin — from a public Git repository or any URL, and lets it add menu items, context-menu entries, hotkeys, dialogs, floating panels, map tools and overlays, read the open map and edit it through the same undo model the built-in tools use. This document is the plugin author's guide; Host side (for editor developers) near the end is the editor's half of it, and every call is also generated into a page at docs.scmjs.dev/api.

Nine plugins are written against exactly this API, each in its own repository, and they are the worked examples for everything below — there is a section on each at the end. Nothing about them is privileged: the versions that ship are pinned and compiled into the build, so a fresh install needs no network, but a plugin you write takes the same path through the same loader.