Install
@reviseio/sdk is a private package. Installing it needs the access token
we issue you — see access and authentication for the token, CI, and
registry-proxy details.
The short version: point the @reviseio scope at npm and authenticate it.
.npmrc
jsdom is an optional peer used only by the server-side
primitives.
Requires React 18 or newer and Node 18 or newer to build. The component is
browser-only: render it client-side (in Next.js, a
"use client" component,
usually behind next/dynamic with ssr: false).Size, and how to load it
The package is a word processor: a canvas layout engine with real pagination, the DOCX reader and writer, PDF export, and the agent tool surface. It is about 1.5 MB gzipped, and there is no smaller build — the parts are not separable in a way that would leave a working editor. So do not put it in your entry bundle. Load it when a document is actually opened:next/dynamic with ssr: false does the same job and keeps the
component out of the server render, which it requires anyway.
The stylesheet is a further 24 KB gzipped. Import it in the same lazily
loaded module rather than your global CSS, and it follows the same path.
Render a document
ReviseEditor is a multi-document workspace. Give each document a stable ID
that you own — the SDK uses it for routing, callbacks, and agent tools. The
source can be a DOCX, Markdown, plain text, or HTML file; see supported
formats.
DocumentPane.tsx
Get the file back
exportDocx() returns a Blob you can download, upload, or diff. Comments and
tracked changes survive the round trip.
whenReady() matters only if you call this before the user has done
anything — from a button click the document is long since open. It is here
because acting on a document that has not finished opening throws.Start from a blank document
What to read next
Architecture
What the component owns, and what stays yours.
Multi-document sessions
Opening, activating, and closing documents.
Bring your own UI
Turn off the ribbon and drive the editor from your own toolbar.
Tools for your agent
Hand the document to the model you already run.