Paged Docs
Embedding the editor
The composable editor — a product embeds paged and decides what its users get, from the whole editor to a one-module app, a template form or a viewer.
Reviewed against engine v0.74.2
One editor, many shapes, chosen by the product that embeds it.
In short The paged editor can be composed. A product that embeds it — a web-to-print shop, a marketing tool, an asset manager, any app with a "design this" button — decides which bundles load, which parts of the chrome exist and what each holds (a profile), which single commands, panels and tools are offered (features), and who the session is (a role: author, editor, filler or viewer). Roles are enforced by the engine against the document's template policy; profiles and features shape only the UI.
The shapes
| Shape | What the end user sees | How |
|---|---|---|
| Full | The whole editor. | the full preset |
| Focused | One module's application: a drawing program, a word processor, a sheet. | the solo:<name> presets |
| Fill in | A template with its open fields and a form beside it; nothing else can change. | the template-fill preset, role filler |
| View | The pages, with pan and zoom; nothing can change. | the viewer preset, role viewer |
All four are the same application and the same document model. A preset is a named profile; a host can extend one and adjust it entry by entry.
The three layers
- Profiles and presets — what the editor registers: bundles, host panels, modes, and the regions of the chrome with their ordered contents. Data, resolved once at start.
- Features — what the editor offers while it runs: switch a command, panel, tool, menu path, keybinding or piece of canvas furniture off and on, by id, glob or predicate. Not a security boundary.
- Roles and the template policy — what may happen to the document. Checked by the engine for every caller — UI, script, plugin or automation surface. See Permissions and roles.
A host mounts the editor and drives it through a handle:
mountEditor and createEditor, or, from
another origin, the editor in an iframe with
connectEditor. The host also chooses the editor's look
(Theming) and its language
(Languages).
What ships and what is planned
Available in the editor (in apps/editor of the public
paged-media/paged repository):
- editor profiles, the presets
full,solo:<name>,template-fillandviewer, and?profile=/?solo=in the editor's URL; - every chrome region optional, region contents as ordered lists, open mode ids,
and host slots (
{ kind: "host", id }) the host renders its own component into; - the feature store and the generated feature-id inventory;
- the session role, the template form (module fields included), field outlines on the canvas, typed refusals, and the author's Template panel with preview as filler;
mountEditorwith host actions (save, submit, close, back), and thecreateEditorhandle over it, withsetThemeand alocale;- the iframe page (
embed.html) andconnectEditor, the same handle across an<iframe>; - the editor's words in a string catalogue: English, and German for the whole editor and every built-in module;
- several independent editors on one page, each under its own root, with its
settings kept where the host says (
storage); - the npm package
@paged-media/editor, built onmainand not yet published; - template preflight and catalogues made from a template (see Templates).
Planned (no dates): further host actions (export, upload, asset picking and resolving, validation).
Live demos
The demo gallery at play.paged.media/demos/
runs the composable editor through createEditor and connectEditor: the full
editor, the focused module editors, a viewer, theme and language, a locked
business card, a postcard filled from the host's own form, a custom host UI, a
photobook, the iframe, and batch generation. Each demo is one page under
apps/editor/apps/canvas/demos/ in the repository. They need a browser with
WebGPU. The existing live demos show the editor itself.
Related
- On paged.media: the embeddable editor.
API reference
The complete @paged-media/viewer API — every exported function, method, property, event, and type — generated from the package surface, with a live filter.
Profiles and presets
An editor profile is data — the bundles, modes and chrome regions an editor has and what each region holds. Presets are named profiles; ?profile= picks one.