Installation

Install the DOCX editor in React or Vue, add the stylesheet, and set a client-only boundary for server-rendered apps.

Install packages

Install one adapter and the engine. Each adapter declares @docx-editor.dev/core as a peer and needs one shared copy.

npm install @docx-editor.dev/react @docx-editor.dev/core

Add optional packages as your app needs them:

PackageAddsLicense
@docx-editor.dev/proTracked changes, comments, and custom nodesEigenPal Pro License
@docx-editor.dev/editor-apiOffice.js-compatible editing on a server or with an open editor. Install with @docx-editor.dev/core.EigenPal Pro License
@docx-editor.dev/fontsOpen-licensed substitutes for common DOCX default fontsApache-2.0 AND OFL-1.1 AND LicenseRef-GUST-Font-License

Check runtime requirements

RuntimeSupported versions
React^18 || ^19
Vue^3.3
Node.js (SSR, headless automation, build-time rendering)^20.16.0 || >=22.3.0

Text measurement needs a text shaper. On an older Node.js version the shaper does not start, and the engine reports the Node.js version as the cause. Browser-only apps do not need Node.js.

Add styles and a container

Import the stylesheet once and give the parent a height:

import { DocxEditor } from '@docx-editor.dev/react';
import '@docx-editor.dev/core/styles/editor.css';

export default function App() {
  return (
    <div style={{ height: '100vh' }}>
      <DocxEditor document="blank" />
    </div>
  );
}
  • The stylesheet is required. The Vue stylesheet imports the same core stylesheet that React uses.
  • <DocxEditor> fills its parent. A parent without a height collapses, and the editor does not appear.
  • Your app does not need Tailwind or an icon font. The precompiled CSS uses the .docx-editor scope.

For a complete load and save flow, see the quickstart.

Choose a framework setup

The editor uses the DOM to measure text, so it renders on the client only. Server-rendered frameworks need a client-only boundary.

FrameworkBoundaryGuide
Vite with ReactNoneVite
Vite with VueNoneVite with Vue
Next.jsdynamic() with ssr: falseNext.js
RemixMount check and React.lazyRemix
AstroReact island with client:onlyAstro
Nuxt.client.vue componentNuxt

Test a canary build

Canary builds publish each night from main when it has unreleased changes that passed CI. They have no support guarantee. Use the canary tag on every @docx-editor.dev package in your app:

npm install @docx-editor.dev/react@canary @docx-editor.dev/core@canary
  • A canary version looks like 2.35.0-canary.20261103032300.sha-b20ba9f: next release, UTC build time, and source commit.
  • The packages of one canary pin each other to that exact version. Install every package from the same tag.
  • Version ranges such as ^2.34.0 never select a canary.

Next steps