Editor tools location

Editor tools allow you to extend the functionality of the Uniform's visual editor. These tools appear as additional menu items in the left side rail of the visual editor.

Editor tools can be enabled for the following contexts:

  • Compositions and Composition patterns
  • Component patterns
  • Entries
  • Entry patterns

It is possible to provide custom URLs for each of the contexts.

Editor tool of the AI Translation integration in the visual editor.
Example of the editor tool of the AI Translation integration in the visual editor.
{ "locations": { "canvas": { "editorTools": [ { "id": "translation-tool", "name": "Example Translation Tool", "url": "/reference/canvasEditorToolsTranslation", "iconUrl": "/uniform.png" }, { "id": "composition-inspector", "name": "Composition Inspector", "url": "/reference/canvasEditorTools", "iconUrl": "/uniform.png", "editorTypes": ["composition"] } ] } } }

Each editor tool entry supports:

  • id — unique tool identifier
  • name — label shown in the side rail
  • url — page URL in your mesh app
  • iconUrl — optional icon
  • editorTypes — optional list limiting which editor contexts show the tool (composition, componentPattern, compositionDefaults, entry, entryPattern)

Use useMeshLocation('canvasEditorTools') to access the tool's metadata and value:

APIDescription
value.rootEntitySerialized composition (RootComponentInstance) or entry (EntryData) tree
value.entityTypeEditor context: composition, componentPattern, compositionDefaults, entry, or entryPattern
value.patternNamesIndexPattern name lookup (compositions only)
value.entryNamesIndexEntry name lookup (compositions only)
metadata.currentLocaleLocale currently selected in the editor UI
metadata.dynamicInputsDynamic inputs from the project map node (if any)
metadata.componentDefinitionsComponent definitions index keyed by public ID
metadata.releaseIdRelease ID of the entity being edited (if in a release)
metadata.activeReleaseIdActive release ID from the editor context

Editor tools receive an imperative editorState object through useMeshLocation('canvasEditorTools') for reading and mutating the surrounding composition or entry. See the Editor state API documentation for the full method reference and a translation example.