DocMosaicdocs
Primitives

Editor.StaticCanvas

Read-only canvas variant. Equivalent to Editor.Canvas with readOnly.

Read-only canvas variant. Equivalent to Editor.Canvas with readOnly.

Usage

import { Editor } from '@docmosaic/react';

<Editor.Root>
    <Editor.StaticCanvas />
</Editor.Root>;

API Reference

PropTypeDefaultDescription
childrenReactNode-

Two kinds of children are supported: 1. **Section template**

  • a single non-overlay child rendered once per section. Pass <Editor.Section /> (or a custom section component that consumes useEditorSection) to control how each section is rendered. Defaults to the bundled <Section /> when omitted. 2. **Canvas overlays**
  • primitives that opt in via the __editorCanvasOverlay marker (e.g. Editor.Zoom). These are rendered once, anchored to the canvas viewport, and have access to useEditorCanvas via context. Any number can be supplied alongside the section template.
showControlsboolean | undefined-

Render the built-in top-right CanvasControls zoom strip. Defaults to true. Set false when the surrounding layout supplies its own zoom widget (e.g. the app-shell mounts a single bottom-center Editor.Zoom) so there is exactly one zoom control on the canvas.

  • Root - the orchestrator