Plugins
Installing plugins and what they may do, writing one, and a tour of the API.
A plugin is a small program the editor loads from a public Git repository or a web address. It can add menu items, hotkeys, dialogs, panels, map tools and overlays, and it can read and change the open map through the same undo model the built-in tools use.
This page has five parts, and ends with a list of plugins to read:
- Using plugins: what is available, how to install one, what a plugin is allowed to do, and how to update or remove one.
- Your first plugin: a small plugin built step by step, from a few lines in the playground to a published repository.
- Writing a plugin: each piece in detail: the playground, the two files, typings, bundling, debugging, testing, publishing.
- Recipes: complete snippets for common jobs, such as a problems panel, a brush of your own, or triggers generated from a table.
- The API, group by group: what each part of the API is for, the rules a signature does not show, and an example for each. Every call has its own entry in the API reference, generated from the editor's declarations.
How the editor loads plugins internally is in docs/development.md.
- Using pluginsThis part is for map makers: which plugins there are, how to install and update them, and what you are trusting when you do.
- Your first pluginThis part builds one small plugin from nothing to a published repository.
- Writing a pluginA plugin is one TypeScript or JavaScript file exporting an activate(api) function, next to a plugin.json, in a public repository.
- RecipesComplete snippets for common jobs, each using several parts of the API together.
- The API, group by groupThis part covers what each group is for and the rules that matter when using it, with an example for each.
- Plugins to readEach plugin is its own repository with a README, built against the same API.