Skip to main content
The SDK is the @reviseio/editor package on the public npm registry. Installing it requires no account or token.
npm and pnpm install the peer dependencies (React, yjs, y-protocols) automatically. On Yarn, list them: yarn add @reviseio/editor yjs y-protocols. For server-side work, also install revise at the same version: npm i revise@3.1.7. @reviseio/editor is free for evaluation, personal projects, and education. Production use by businesses, nonprofits, and government requires a commercial license. Building and prototyping are free.

Entry points

Peer dependencies

React 18 or newer, yjs, and y-protocols are required peers. The SDK does not bundle its own copies. Every editor session uses Yjs, with or without a collaboration provider. The editor never loads revise; a browser-only app doesn’t need it. Server code imports revise and doesn’t need React. revise needs Node 20 or newer and brings its own DOM implementation, so there is no jsdom to install.

Bundle size

The editor is a word processor, with DOCX, layout, and PDF export, and its main chunk is about 2.7 MB minified (about 800 KB gzipped). Load it where a document opens rather than in your entry bundle; see load on demand. Converters, PDF export, math, and locales load separately, when first used. Vite warns about any chunk over 500 kB. For the editor that warning is expected. Raise the limit if you want a clean build:
vite.config.ts

Versioning

The package follows semantic versioning. Pin what you ship:
package.json
Use an exact version, not a range. The package ships a CHANGELOG.md. Read it before changing versions. Breaking changes to the component props or the handle controllers ship only in major versions.

Migrate from version 2

The version jumps from 2.3.2 to 3.1.7 because the editor now releases in lockstep with revise: one version, built from one commit. 2.x stays installable and gets fixes on the 2.x line (npm i @reviseio/editor@v2). Version 3 removes the editor’s /server entry point. Server-side work moved to revise, the MIT library built on the same engine and released at the same version. Install it (npm i revise@3.1.7) and replace the server imports: The browser entry points and the component API are unchanged. Documents move between the two unchanged: a Y.Doc the editor edits is a Y.Doc revise opens, and the reverse. The 2.3 docs, /server included, stay available from the version menu. Three differences when porting server code:
  • revise methods are async: await them.
  • Tools return { ok, value } or { ok, error } instead of throwing, so check result.ok and read result.value.
  • doc.export() returns { bytes, fidelity, … }: write .bytes.
doc.snapshot() is revise’s own storage format (it carries the original Word file and the document’s settings), not a Y.js update. Anything that speaks Y.js, such as a sync server or the editor, takes Y.encodeStateAsUpdate(doc.ydoc).

Migrate from revise

Through 2.2, the SDK was published as revise. From 2.3 it is @reviseio/editor: the same editor, license, and API under a new name. From 3.0, revise is a different package: the MIT CLI and server-side library. Install the editor and update imports:
If you used revise/server, upgrade revise to the editor’s version (npm i revise@3.1.7); otherwise uninstall it. Server code then follows Migrate from version 2; everything else is unchanged. If your bundler config names the package (for example Vite’s optimizeDeps.exclude), rename it there too. The 2.2 and earlier docs stay available from the version menu.

Migrate from @reviseio/sdk

The private @reviseio/sdk package is retired. Replace the dependency with @reviseio/editor, delete the @reviseio registry and token lines from .npmrc (@reviseio/editor is on the public registry), and update imports: The named ReviseEditor export still works alongside the default export.

Report a problem

Include the SDK version and build. Both are exported, so your error reporting can attach them:
npm bugs @reviseio/editor opens the support route.

Assets

The SDK loads some static assets on demand instead of bundling them:
  • PDF export fonts, including the CJK and world-script faces
  • math fonts and stylesheet
  • the PDF reader’s worker
  • Tree-sitter grammars (@reviseio/editor/full only)
By default they load from https://revise.io. A strict Content Security Policy must allow that origin in connect-src, font-src, style-src, and worker-src. To serve them yourself, mirror these paths from https://revise.io to your origin with the same layout:
  • fonts/
  • katex.min.css
  • pdfjs/
  • tree-sitter/ (only for @reviseio/editor/full)
Then set the base URL once at startup:

Troubleshooting

The package requires React 18 or newer. Installing on React 17 or earlier fails.
Two copies of Yjs are loaded. Make your bundler resolve a single yjs, for example with a resolve.dedupe entry in Vite.
The editor was published as revise through 2.2 and is @reviseio/editor from 2.3. revise 3.x is the CLI and server-side library. See Migrate from revise.