Revise Editor SDK menu

Appearance

Theme, colors, fonts, zoom, and container sizing.

Theme#

theme accepts "light" (default) or "dark" and is scoped to that editor instance without modifying the surrounding page:

TSX
<ReviseEditor theme="dark" initialDocuments={docs} />

Colors#

Configure three surfaces via props or CSS custom properties on the editor root:

PropCSS variableSurface
canvasBackground--revise-canvas-backgroundBackdrop behind pages (any CSS background, including gradients)
pageBackground--bg-pagePage surface, image placeholders, container fills, and table cell defaults
pageBorderColor--page-borderPage outline
TSX
<ReviseEditor
  canvasBackground="#b9c6bf"
  pageBackground="#faf6ef"
  pageBorderColor="#42524f"
  initialDocuments={docs}
/>

Fonts#

Register custom fonts for the picker, separating the DOCX family name from the browser CSS stack:

TSX
<ReviseEditor
  fonts={[
    {
      family: "Counsel Sans",
      label: "Counsel Sans",
      cssFamily: "'Counsel Sans', Arial, sans-serif",
      fontWeight: 500,
    },
  ]}
  initialDocuments={docs}
/>

family is written into the document and .docx; cssFamily is used for browser rendering only.

Load font files yourself via @font-face or a stylesheet. Unloaded families render in a fallback font in the browser while still exporting the declared family to .docx.

Zoom#

zoom accepts any positive number or "fit-width" (default):

TSX
<ReviseEditor defaultZoom="fit-width" initialDocuments={docs} />
TypeScript
editor.zoom.setZoom(1.25);
editor.zoom.fitWidth();

const { zoom, scale } = editor.zoom.getState();
useEffect(() => editor.zoom.subscribe(setZoomState), [editor]);

zoom is the requested setting; scale is the effective canvas scale. For "fit-width", scale recomputes when the container width or comments panel changes. Numeric zoom stays fixed and scrolls horizontally.

WASM hot paths#

Rust/WASM acceleration for word diffing, agent text matching, and document statistics is opt-in and available only via the revise/full entry point (not CSP-safe):

TSX
import ReviseEditor from "revise/full";

<ReviseEditor wasmHotPaths initialDocuments={docs} />;

The binary is inlined in revise/full. If WebAssembly is unavailable, the editor falls back to identical TypeScript implementations.

Container size#

The editor fills its parent container (className and style apply to the editor root):

TSX
<div style={{ height: "80vh" }}>
  <ReviseEditor initialDocuments={docs} />
</div>