Paged.The open publishing system
The technical handbook
Embedding the editor

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.

Tier: IntermediateIntermediateIIexplanationDraft

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

ShapeWhat the end user seesHow
FullThe whole editor.the full preset
FocusedOne module's application: a drawing program, a word processor, a sheet.the solo:<name> presets
Fill inA template with its open fields and a form beside it; nothing else can change.the template-fill preset, role filler
ViewThe 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

  1. 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.
  2. 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.
  3. 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-fill and viewer, 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;
  • mountEditor with host actions (save, submit, close, back), and the createEditor handle over it, with setTheme and a locale;
  • the iframe page (embed.html) and connectEditor, 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 on main and 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.

On this page