Open-source WYSIWYG .docx editor for React and Vue with canonical OOXML, tracked changes, and real-time collaboration. Agent-ready. Live demo | Documentation
npm install @docx-editor.dev/reactSee the React quick start below.
npm install @docx-editor.dev/vueSee the Vue quick start below.
npm install @docx-editor.dev/nuxtSee the Nuxt quick start below.
| Package | Description | Docs |
|---|---|---|
@docx-editor.dev/react |
Docs | |
@docx-editor.dev/vue |
Docs | |
@docx-editor.dev/nuxt |
Docs | |
@docx-editor.dev/core |
Framework-agnostic core: OOXML parser, serializer, layout engine, ProseMirror schema. Depend on this if you fork the React or Vue adapter. | Docs |
@docx-editor.dev/i18n |
Shared locale strings and types consumed by both adapters. | Docs |
@docx-editor.dev/agents |
Agent SDK and chat UI: framework-agnostic bridge, MCP server, AI SDK adapters, plus UI components. | Docs |
Forking the adapter? Keep your fork thin. Depend on
@docx-editor.dev/coredirectly so parser, serializer, and rendering fixes land in your build automatically, without backporting each upstream change by hand.
import { useState } from 'react';
import { DocxEditor } from '@docx-editor.dev/react';
import '@docx-editor.dev/react/styles.css';
export function App() {
const [buffer, setBuffer] = useState<ArrayBuffer | null>(null);
return (
<>
<input
type="file"
accept=".docx"
onChange={async (e) => setBuffer((await e.target.files?.[0]?.arrayBuffer()) ?? null)}
/>
{buffer && <DocxEditor documentBuffer={buffer} mode="editing" />}
</>
);
}Next.js / SSR: Use dynamic import. The editor requires the DOM.
Full docs: packages/react · API reference.
<script setup lang="ts">
import { ref } from 'vue';
import { DocxEditor } from '@docx-editor.dev/vue';
import '@docx-editor.dev/vue/styles.css';
const buffer = ref<ArrayBuffer | null>(null);
async function loadFile(e: Event) {
const file = (e.target as HTMLInputElement).files?.[0];
buffer.value = file ? await file.arrayBuffer() : null;
}
</script>
<template>
<input type="file" accept=".docx" @change="loadFile" />
<DocxEditor v-if="buffer" :document-buffer="buffer" mode="editing" />
</template>Full docs: packages/vue · API reference.
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@docx-editor.dev/nuxt'],
});@docx-editor.dev/nuxt wraps the Vue adapter as a Nuxt 3 & 4 module: it auto-imports an SSR-safe <DocxEditor> component (no manual import, no <ClientOnly> wrapper) and the Vue composables.
Full docs: packages/nuxt.
import { DocxEditor } from '@docx-editor.dev/react';
import { PluginHost, templatePlugin } from '@docx-editor.dev/react/plugin-api';
<PluginHost plugins={[templatePlugin]}>
<DocxEditor documentBuffer={buffer} />
</PluginHost>;See the plugin documentation for the full plugin API.
bun install
bun run dev # localhost:5173
bun run build
bun run typecheckA live preview of main is auto-deployed at latest.docx-editor.dev — useful for trying out changes before they ship to npm.
Examples: Vite | Next.js | Remix | Astro | Vue | Nuxt
Documentation | Props & Ref Methods | Plugins | Architecture
Contributions welcome. See CONTRIBUTING.md for setup, tests, and the one-time CLA signature.
| Locale | Language |
|---|---|
en |
English |
de |
German |
fr |
French |
he |
Hebrew |
hi |
Hindi |
pl |
Polish |
pt-BR |
Portuguese (Brazil) |
tr |
Turkish |
zh-CN |
Chinese (Simplified) |
Help translate the editor into your language! See the full i18n contribution guide.
bun run i18n:new de # scaffold German locale
bun run i18n:status # check translation coverageTip
Questions or custom features? Email docx-editor@eigenpal.com.