Plugins
Plugins let a host application add optional panels, editors, creators, background actions, tags, and configuration to the Manifest Editor without creating a separate preset. They are registered with the editor and then enabled per application, workspace, or host configuration.
The packaged React component uses the app id manifest-editor. Use that id when passing plugin configuration through the config prop.
Configuring plugins in a host app
Plugin configuration lives under config.plugins.apps[appId].
import "manifest-editor/reset.css";
import "manifest-editor/dist/index.css";
import { ManifestEditor, type Config } from "manifest-editor";
const config: Partial<Config> = {
plugins: {
apps: {
"manifest-editor": {
enabled: ["@example/plugin"],
disabled: ["@example/disabled-plugin"],
settings: {
"@example/plugin": {
mode: "automatic",
},
},
},
},
},
};
export function App() {
return (
<ManifestEditor
resource="https://example.org/manifest.json"
config={config}
/>
);
}The enabled and disabled arrays select plugins by metadata id. settings is keyed by the same plugin id and is merged with plugin defaults. Workspace settings override global settings, and global settings override plugin defaults.
If a plugin is not part of the built-in manifest preset, pass it with the plugins prop:
import customPlugin from "./plugins/custom-plugin";
<ManifestEditor
resource="https://example.org/manifest.json"
plugins={[customPlugin]}
config={config}
/>;Worker-backed plugins in Vite
Some optional plugins use web workers or model assets. In a Vite app, import the worker entry as a URL and pass it as plugin settings.
import { ManifestEditor, type Config } from "manifest-editor";
import ocrDoclingPlugin from "@manifest-editor/ocr-docling/lazy";
import doclingWorkerUrl from "@manifest-editor/ocr-docling/docling-worker?worker&url";
const config: Partial<Config> = {
plugins: {
apps: {
"manifest-editor": {
enabled: ["@manifest-editor/ocr-docling"],
settings: {
"@manifest-editor/ocr-docling": {
imageSize: 1024,
workerUrl: doclingWorkerUrl,
},
},
},
},
},
};
export function App() {
return (
<ManifestEditor
resource="https://example.org/manifest.json"
plugins={[ocrDoclingPlugin]}
config={config}
/>
);
}You can also host the worker yourself and pass a public URL:
const config: Partial<Config> = {
plugins: {
apps: {
"manifest-editor": {
enabled: ["@manifest-editor/ocr-docling"],
settings: {
"@manifest-editor/ocr-docling": {
workerUrl: "/assets/docling-worker.js",
},
},
},
},
},
};The same pattern applies to the translation plugin:
import translationPlugin from "@manifest-editor/translation/lazy";
import translationWorkerUrl from "@manifest-editor/translation/translation-worker?worker&url";
const config: Partial<Config> = {
plugins: {
apps: {
"manifest-editor": {
enabled: ["@manifest-editor/translation"],
settings: {
"@manifest-editor/translation": {
runtimePreference: "auto",
workerUrl: translationWorkerUrl,
},
},
},
},
},
};Lazy plugins
Normal plugin modules are synchronous. If they are imported by a preset or host app, Vite includes them in the module graph even when defaultEnabled is false.
Lazy plugins solve this by separating lightweight metadata from the implementation. The plugin manager can list and configure the plugin from metadata, while the implementation is loaded only when the plugin is selected.
import type { LazyPluginModule } from "@manifest-editor/shell";
import metadata, { settings } from "./plugin";
export default {
default: metadata,
settings,
load: () => import("./index"),
} satisfies LazyPluginModule;A lazy plugin can be passed anywhere a normal plugin can be passed:
import ocrDoclingPlugin from "@manifest-editor/ocr-docling/lazy";
<ManifestEditor
resource="https://example.org/manifest.json"
plugins={[ocrDoclingPlugin]}
config={{
plugins: {
apps: {
"manifest-editor": {
enabled: ["@manifest-editor/ocr-docling"],
},
},
},
}}
/>;When the plugin is enabled, the shell sets it to a loading state, calls load(), and then applies the loaded plugin contributions. If loading fails, the plugin remains visible in the manager with the error message and can be disabled.
Creating a plugin
A plugin uses the same extension shape as a preset. The default export is metadata, and named exports contribute layout or runtime features.
import type {
BackgroundActionDefinition,
LayoutPanel,
PluginMetadata,
PluginSettingsDefinition,
} from "@manifest-editor/shell";
export type ExamplePluginSettings = {
mode?: "manual" | "automatic";
};
export default {
id: "@example/plugin",
label: "Example plugin",
description: "Adds example tools to the manifest editor.",
author: "Example",
defaultEnabled: false,
supports: {
apps: ["manifest-editor"],
projectTypes: ["Manifest"],
},
} satisfies PluginMetadata;
export const settings: PluginSettingsDefinition<ExamplePluginSettings> = {
defaults: {
mode: "manual",
},
fields: [
{
id: "mode",
label: "Mode",
type: "select",
options: [
{ label: "Manual", value: "manual" },
{ label: "Automatic", value: "automatic" },
],
},
],
};
export const leftPanels: LayoutPanel[] = [examplePanel];
export const backgroundActions: BackgroundActionDefinition[] = [
createExampleBackgroundAction(),
];Plugin settings are read at runtime through the plugin runtime API:
import { usePluginSettings } from "@manifest-editor/shell";
const settings = usePluginSettings<ExamplePluginSettings>("@example/plugin");Background actions receive the same settings through their run context:
const settings = ctx.plugins.getSettings<ExamplePluginSettings>("@example/plugin");Creating a lazy plugin package
For larger plugins, split metadata from implementation.
import type { PluginMetadata, PluginSettingsDefinition } from "@manifest-editor/shell";
import type { ExamplePluginSettings } from "./types";
export default {
id: "@example/plugin",
label: "Example plugin",
defaultEnabled: false,
supports: {
apps: ["manifest-editor"],
projectTypes: ["Manifest"],
},
} satisfies PluginMetadata;
export const settings: PluginSettingsDefinition<ExamplePluginSettings> = {
defaults: {
mode: "manual",
},
};import type { BackgroundActionDefinition } from "@manifest-editor/shell";
import { createExampleBackgroundAction } from "./background-action";
export { default, settings } from "./plugin";
export const backgroundActions: BackgroundActionDefinition[] = [
createExampleBackgroundAction(),
];
export * from "./background-action";
export * from "./types";import type { LazyPluginModule } from "@manifest-editor/shell";
import metadata, { settings } from "./plugin";
export default {
default: metadata,
settings,
load: () => import("./index"),
} satisfies LazyPluginModule;Publish the lazy entrypoint as a subpath:
{
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./lazy": {
"import": "./dist/lazy.js",
"require": "./dist/lazy.cjs"
}
}
}If the plugin has a worker entry, publish that as a subpath too:
{
"exports": {
"./worker": {
"import": "./dist/worker.js",
"require": "./dist/worker.cjs"
}
}
}Host applications can then import the worker URL with Vite:
import workerUrl from "@example/plugin/worker?worker&url";Use lazy plugins for large default-disabled features, model-backed features, worker-backed features, or plugins that depend on optional third-party libraries.
Variations Timeliner
The manifest preset includes the optional Variations Timeliner plugin, inspired by IUBLibTech’s Timeliner . Enable it in the plugin manager, then choose Variations Timeliner in the left sidebar. Like A/V Ranges, the panel is only offered when the manifest has an audio or video canvas with a duration. Hosts can also enable it explicitly:
const config: Partial<Config> = {
plugins: {
apps: {
"manifest-editor": {
enabled: ["@manifest-editor/variations-timeliner"],
},
},
},
};The plugin contributes three coordinated panels, and a background task that keeps them in sync:
- Left sidebar lists the sections (IIIF Ranges) configured so far, nested as they are in the manifest. Choosing a section selects it, moves the playhead to its start and opens its editor.
- Centre panel draws the nested section bubbles above the transport controls, with the manifest details, media player and markers below.
- Right panel is the section editor: title and description, start and end times (with “Set to playhead” shortcuts), bubble colour, sub-sections, split, delete, and a link to the standard Manifest Editor for everything else.
Open a manifest containing an audio or video painting annotation and a canvas duration. Until
the canvas has a section, both the sidebar and the centre panel prompt you to create the
first one — a single bubble spanning the whole recording, which is then selected so you can
split it at the playhead. Existing Timeliner ranges using Canvas#t=start,end and IIIF
temporal selectors are read from Vault; parent bubble extents follow their child ranges.
- Split at playhead divides a simple section, preserving its metadata. The sidebar’s + adds a section in the largest uncovered stretch of the timeline.
- Ctrl/Cmd-click adjacent sibling sections and choose Group sections to create a nested Range. Deleting a group promotes its children.
- Drag a boundary handle to move a shared section boundary, or focus it and press Left/Right (Shift for tenths of a second).
- Below the bubbles is a scrubber modelled on the Theseus audio player: a thin rail that thickens on hover, a thumb, a time tooltip, and the playhead and pointer guide lines. The rail sits in the same scrolling surface as the bubbles, so the thumb and the line running up through the bubbles always share one position — including when zoomed in and scrolled. Dragging near an edge scrolls the view, and playback turns the page when the playhead reaches the right edge. The selected sections are highlighted on the rail.
- Transport controls are round icon buttons with tooltips and shortcuts:
Space/kplay,←/→±5s,j/l±10s,mmute,↑/↓volume,0–9jump,Home/End,[/]previous/next section. Speed, loop, markers, split, group, delete and zoom use the same style. - Drag the grip under the scrubber (or focus it and press Up/Down) to resize the bubble viewport.
Zooming is animated and keeps the middle of the view in place; it respects
prefers-reduced-motion. - Theme offers the original Timeliner’s colour palettes, background colours, square bubbles and black-and-white display. Each section can also have its own colour.
- View preferences are kept in local storage so they survive page reloads: theme, viewport height, zoom (per media canvas), speed, volume, mute and loop. Section colours are project data (see below).
- Add marker creates a time-point annotation. All markers share one annotation page: the timeliner
uses a page that already contains point-selector annotations for the canvas (on the manifest or the
canvas), and only creates a
…/markerspage on the manifest when there is none. Pages that hold nothing but markers, such as the one-marker-per-page data earlier versions wrote, are merged into it when the next marker is added. Marker titles can be edited in the list; click a marker to seek to it. - Playback includes volume, speed, section looping and previous/next section. Captions are included when the canvas supplies WebVTT tracks.
Ranges and marker annotations live in Vault and use the normal Manifest Editor save and export flow. The plugin has no separate Redux store, document storage, or save mechanism. Playback, selection, zoom and theme belong to the view.
A section’s custom colour is stored as a tl:backgroundColour entry in the Range’s
metadata, because the IIIF serializer only writes known Range properties and would otherwise
drop it on export. Multi-target ranges can be viewed and edited using the standard editor;
splitting and boundary dragging are restricted to simple temporal leaves to preserve other targets.
Range editor
The default Range editor now opens on Overview (previously Structure). For ranges, the Overview tab shows the label, summary and required statement together with the range’s sub-ranges; Structure still manages the full list of items, including canvases and ordering.