# DOCX Editor — @eigenpal/docx-editor-* (1.x line) > Open-source DOCX editor for React and Vue 3 with a Word-JS-API-shaped agent toolkit. Five focused packages at 1.0 (split from the 0.x monolithic `@eigenpal/docx-js-editor`). Edit .docx files in the browser with full fidelity (tables, images, tracked changes, threaded comments, realtime collaboration via Yjs, i18n). Drive the editor with an AI agent live in the browser, headless on the server, or over MCP. Apache 2.0. ## Packages (1.x) **`@eigenpal/docx-editor-core`** — framework-agnostic document tree, OOXML parser/serializer, ProseMirror schema, plugin contract. 70 documented subpaths. React and Vue adapters depend on it. ```bash npm install @eigenpal/docx-editor-core ``` **`@eigenpal/docx-editor-react`** — React adapter. ``, hooks, dialogs, toolbar, plugin host. ```bash npm install @eigenpal/docx-editor-react ``` Subpath exports: `/ui`, `/hooks`, `/dialogs`, `/plugin-api`, `/styles`. Works with Next.js, Vite, Remix, Astro. **`@eigenpal/docx-editor-vue`** — Vue 3 adapter. Mirrors the React surface 1:1 (``, composables, dialogs, plugin host). New in 1.0. Parity with React enforced by `etc/parity.contract.json` upstream. ```bash npm install @eigenpal/docx-editor-vue ``` **`@eigenpal/docx-editor-agents`** — agent toolkit. 14 tools, three transports. Apache 2.0 (relicensed from AGPL in 1.0). ```bash npm install @eigenpal/docx-editor-agents ``` Subpath exports: - `@eigenpal/docx-editor-agents` — `DocxReviewer` (headless server-side), `agentTools`, `getToolSchemas`, `executeToolCall`, `createReviewerBridge`, `WordCompatBridge` type. - `@eigenpal/docx-editor-agents/react` — `useDocxAgentTools`, `useAgentChat`, `getToolDisplayName`. React hooks for the live in-editor transport. - `@eigenpal/docx-editor-agents/vue` — Vue composables matching the React hooks. - `@eigenpal/docx-editor-agents/bridge` — lower-level transport for non-React, non-Vue hosts. - `@eigenpal/docx-editor-agents/server` — server-side types: `AgentContextSnapshot`, `AgentToolDefinition`. - `@eigenpal/docx-editor-agents/ai-sdk/server` — `getAiSdkTools()` for `streamText({ tools })`. - `@eigenpal/docx-editor-agents/ai-sdk/react` — `toAgentMessages()` to bridge `useChat`'s `UIMessage[]` into the `` shape. - `@eigenpal/docx-editor-agents/ai-sdk/vue` — Vue equivalent of `ai-sdk/react`. - `@eigenpal/docx-editor-agents/mcp` — `McpServer` (MCP spec 2025-06-18, transport-agnostic). **`@eigenpal/docx-editor-i18n`** — typed locale exports shared by React and Vue. Currently ships `en`, `pl`, `de`, `fr`, `pt-BR`, `he`, `hi`, `tr`, `zh-CN`, as named root exports and per-locale subpaths (`/pl`, `/fr`, ...). ```bash npm install @eigenpal/docx-editor-i18n ``` Tool catalog (all 14 tools, all transports): - **Locate**: `read_document`, `read_selection`, `read_page`, `read_pages`, `find_text`, `read_comments`, `read_changes` - **Mutate**: `add_comment`, `suggest_change`, `apply_formatting`, `set_paragraph_style`, `reply_comment`, `resolve_comment` - **Navigate**: `scroll` Schemas are OpenAI function-calling format. Anthropic, Vercel AI SDK, and anything else that takes that shape accepts them as-is. Locate-then-mutate: locate tools return paragraphs tagged with stable `paraId`s; mutate tools take `paraId`s. `paraId`s survive concurrent edits and tool-loop iterations. Word JS API parity: `WordCompatBridge` documents every Office.js Word API method we mirror (`Range.insertComment` → `addComment`, `body.search` → `findText`, `comment.reply` → `replyTo`, `range.scrollIntoView` → `scrollTo`, etc.). Parity is enforced at compile time via a static assertion. Migrating from a Word add-in is a rename. ## Versioning - 1.x docs (current): https://www.docx-editor.dev/docs/1.x — also reachable via the stable alias https://www.docx-editor.dev/docs/latest - 0.x archive (legacy, for projects still on @eigenpal/docx-js-editor): https://www.docx-editor.dev/docs/0.x - Migration guide: https://www.docx-editor.dev/docs/1.x/migration - Auto-generated API reference (every published subpath of every package): https://www.docx-editor.dev/docs/1.x/api ## Links - [npm: docx-editor-react](https://www.npmjs.com/package/@eigenpal/docx-editor-react) - [npm: docx-editor-vue](https://www.npmjs.com/package/@eigenpal/docx-editor-vue) - [npm: docx-editor-core](https://www.npmjs.com/package/@eigenpal/docx-editor-core) - [npm: docx-editor-agents](https://www.npmjs.com/package/@eigenpal/docx-editor-agents) - [npm: docx-editor-i18n](https://www.npmjs.com/package/@eigenpal/docx-editor-i18n) - [GitHub](https://github.com/eigenpal/docx-editor): source, issues, discussions - [llms-full.txt](https://www.docx-editor.dev/llms-full.txt): the 1.x docs corpus concatenated into one plain-text document ## Getting Started - [DOCX Editor 1.x](https://www.docx-editor.dev/docs/1.x): WYSIWYG .docx editor and OOXML toolkit for the web. React and Vue adapters over a shared ProseMirror-based core. Apache 2.0. - [Installation](https://www.docx-editor.dev/docs/1.x/installation): Install the 1.x docx-editor packages in a Next.js, Vite, Remix, Astro, Vue 3, or Nuxt project, with framework-specific setup notes and SSR guidance. - [Migration: 0.x → 1.x](https://www.docx-editor.dev/docs/1.x/migration): Move from @eigenpal/docx-js-editor 0.x to the five-package 1.x line. Package-rename map, moved-symbol map, i18n restructure, license update. ## Internal - [0.x archive](https://www.docx-editor.dev/docs/0.x): Documentation for the 0.x line of @eigenpal/docx-js-editor (the pre-1.0 monolithic package). Kept here for projects that haven't upgraded yet. ## Packages - [@eigenpal/docx-editor-core](https://www.docx-editor.dev/docs/1.x/core): Framework-agnostic core: document tree, OOXML parser/serializer, ProseMirror schema, plugin contract. Underlies both the React and Vue adapters. - [@eigenpal/docx-editor-react](https://www.docx-editor.dev/docs/1.x/react): React adapter: , hooks, dialogs, toolbar, plugin host. Works with Next.js, Vite, Remix, Astro. - [@eigenpal/docx-editor-vue](https://www.docx-editor.dev/docs/1.x/vue): The Vue 3 adapter for docx-editor. The same DocxEditor component as React, with hooks exposed as Vue composables. Beta in the 1.0 line. - [@eigenpal/docx-editor-agents](https://www.docx-editor.dev/docs/1.x/agents): Agent toolkit. 14 tools, three transports (live editor, headless, MCP). Apache 2.0, relicensed from AGPL in 1.0. - [@eigenpal/docx-editor-i18n](https://www.docx-editor.dev/docs/1.x/i18n): Locale data shared by the React and Vue adapters. Ships nine languages: English, Polish, German, French, Portuguese, Hebrew, Hindi, Turkish, and Chinese. ## React - [Props](https://www.docx-editor.dev/docs/1.x/react/props): A curated reference for DocxEditorProps, grouped by concern, with examples for the most common configuration patterns of the React component. - [React Examples](https://www.docx-editor.dev/docs/1.x/react/examples): Concrete patterns for embedding in React: load from URL, controlled comments, autosave, custom toolbar, custom fonts, Yjs collaboration, agent panel. ## Realtime Collaboration - [Realtime Collaboration](https://www.docx-editor.dev/docs/1.x/realtime-collaboration): Sync DocxEditor across users with Yjs, live cursors, presence, comment sync, and tracked changes attribution. ## Vue - [Props](https://www.docx-editor.dev/docs/1.x/vue/props): DocxEditorProps for the Vue 3 adapter: the same prop shape as the React component, bound with Vue's kebab-case attribute syntax. - [Vue Examples](https://www.docx-editor.dev/docs/1.x/vue/examples): Concrete patterns for embedding in Vue 3: load from URL, controlled comments, autosave, custom fonts, Yjs collaboration, agent panel. - [@eigenpal/nuxt-docx-editor](https://www.docx-editor.dev/docs/1.x/vue/nuxt): Official Nuxt 3 and 4 module. Auto-imports an SSR-safe , injects the stylesheet, no boilerplate. ## Agent framework - [Agents. Live editor](https://www.docx-editor.dev/docs/1.x/agents/live-editor): Wire useDocxAgentTools into a running . The agent reads paragraphs, adds comments, suggests tracked changes, and scrolls while the user watches. - [Agents. Bring your own agent](https://www.docx-editor.dev/docs/1.x/agents/bring-your-own): Adapters for Vercel AI SDK, OpenAI, Anthropic, LangChain, and anything else that accepts OpenAI-style function schemas. - [Agents. Word JS API parity](https://www.docx-editor.dev/docs/1.x/agents/word-js-api): Office.js verb mapping. Migrating a Word add-in to this toolkit is a rename. Parity is enforced at compile time. ## Examples - [Interactive Examples](https://www.docx-editor.dev/docs/1.x/examples): Interactive demos for the DocxEditor component. Toggle props like tracked changes, comments, and toolbar modes to see how each feature behaves live. ## Plugins - [Plugin System](https://www.docx-editor.dev/docs/1.x/plugins): Overview of the two plugin systems: EditorPlugin for browser UI extensions, and CorePlugin for headless, server-side document processing. - [Plugin Getting Started](https://www.docx-editor.dev/docs/1.x/plugins/getting-started): Get started with docx-editor plugins: how EditorPlugin and CorePlugin compare, registration patterns, and a hello-world plugin walkthrough. - [EditorPlugin API](https://www.docx-editor.dev/docs/1.x/plugins/editor-plugins): Full reference for browser-side EditorPlugins, panels, overlays, ProseMirror plugins, CSS injection. - [CorePlugin & Headless API](https://www.docx-editor.dev/docs/1.x/plugins/core-plugins): Server-side document manipulation with CorePlugin and DocumentAgent. Run template processing and headless edits without a browser or the editor UI. - [Plugin Examples & Cookbook](https://www.docx-editor.dev/docs/1.x/plugins/examples): A cookbook of plugin patterns: keyboard shortcuts, decorations, overlays, custom toolbar items, and recipes built against the editor plugin API. ## Blog - [Next.js DOCX Editor: Edit and Embed Word Documents in the Browser](https://www.docx-editor.dev/blog/nextjs-docx-editor): Edit DOCX files in your Next.js app with an open-source, client-side Word document editor. Embed the editor with no server and no upload. Includes a live interactive demo. - [Nuxt DOCX Editor: Edit Word Documents in a Nuxt 3 App](https://www.docx-editor.dev/blog/nuxt-docx-editor): Embed a client-side DOCX (Word document) editor in a Nuxt app with @eigenpal/nuxt-docx-editor, the official Nuxt 3 and 4 module. Auto-imported and SSR-safe, with no wrapper to write. Open source, Apache 2.0. With a live interactive demo. - [docx-editor 1.0 release](https://www.docx-editor.dev/blog/migrating-to-1-x): 1.0 splits @eigenpal/docx-js-editor into five packages: a framework-agnostic core, React and Vue adapters, an agent toolkit, and a shared i18n package. This post is about how those five packages are shaped and why the lines fall where they do. - [Vue DOCX Editor: Edit Word Documents in Vue 3](https://www.docx-editor.dev/blog/vue-docx-editor): Add a full-featured DOCX (Word document) editor to your Vue 3 app with @eigenpal/docx-editor-vue. Client-side, no server, no upload. Open source, Apache 2.0. With a live interactive demo. - [Vue DOCX editor: add a Word editor to a Vue 3 or Nuxt app](https://www.docx-editor.dev/blog/vue-docx-word-editor): Step-by-step guide to adding a Word (DOCX) editor to a Vue 3 or Nuxt app with @eigenpal/docx-editor-vue. Install, render, load and save .docx, all client-side. Open source, no server. - [Agent toolkit for DOCX documents](https://www.docx-editor.dev/blog/agent-toolkit-for-docx-documents): An overview of docx-editor-agents: a toolkit for letting AI agents read, comment on, and edit .docx documents. Works live in the browser, headless on the server, or over MCP. - [Real-time Collaboration in docx-js-editor](https://www.docx-editor.dev/blog/realtime-collaboration-yjs-docx-editor): How docx-js-editor adds real-time collaborative editing with Yjs: shared cursors, live presence, and conflict-free document sync across browsers. - [German Translation for React DOCX Editor. DOCX-Editor auf Deutsch](https://www.docx-editor.dev/blog/german-translation-docx-editor): How to use the German (de) locale in docx-js-editor. Localize the toolbar, comments, and track changes UI to German. DOCX-Dokumente bearbeiten mit deutscher Benutzeroberfläche. - [Polish Translation for React DOCX Editor. Edytor DOCX po polsku](https://www.docx-editor.dev/blog/polish-translation-docx-editor): How to use the Polish (pl) locale in docx-js-editor. Localize the toolbar, comments, and track changes UI to Polish. Edytor dokumentow DOCX z polskim interfejsem. - [Astro DOCX Editor: Edit Word Documents in an Astro Site](https://www.docx-editor.dev/blog/astro-docx-editor): Add a browser-based DOCX editor to your Astro project. Client-side Word document editing with React islands. Includes live demo, full code, and deployment tips. - [Remix DOCX Editor: Edit Word Documents in a Remix App](https://www.docx-editor.dev/blog/remix-docx-editor): Add a browser-based DOCX editor to your Remix app. Client-side Word document editing with lazy loading and Suspense. Includes live demo and full setup guide. - [Vite DOCX Editor: Edit Word Documents in a React + Vite App](https://www.docx-editor.dev/blog/vite-docx-editor): Add a browser-based DOCX editor to your Vite project. Open, edit, and save Word documents client-side with zero server dependency. Includes live demo and full code. - [Docxtemplater Template Preview Plugin for React](https://www.docx-editor.dev/blog/docxtemplater-react-template-variable-highlighting): A React plugin for previewing docxtemplater DOCX templates with color-coded variable highlighting, loop detection, and an annotation panel. - [Track Changes in a React DOCX Editor](https://www.docx-editor.dev/blog/track-changes-in-react-docx-editor): How to enable track changes in a React DOCX editor and automate document review with AI agents using DocxReviewer. - [How to Add a DOCX Editor to Your React App](https://www.docx-editor.dev/blog/how-to-add-docx-editor-to-react): Step-by-step tutorial for integrating a full WYSIWYG DOCX editor into any React application using docx-js-editor. No server required. everything runs in the browser. - [Adding Comments to a React Document Editor](https://www.docx-editor.dev/blog/adding-comments-to-react-document-editor): How document comments work in docx-js-editor. threaded discussions, text range anchoring, resolve workflows, and OOXML compatibility with Microsoft Word. - [Edit DOCX Files in the Browser with JavaScript](https://www.docx-editor.dev/blog/edit-docx-files-in-browser-javascript): Learn how to parse, render, and edit Word documents entirely in the browser using JavaScript. No server, no conversion. pure client-side DOCX editing. - [Building a Document Template System with React](https://www.docx-editor.dev/blog/building-document-template-system-react): How to create a document template system using docx-js-editor. Define DOCX templates with variable placeholders, fill them with data, and generate documents programmatically. - [DOCX Editors for JavaScript and React: A Comparison](https://www.docx-editor.dev/blog/open-source-docx-editors-comparison): Comparing the best options for editing Word documents in JavaScript and React. docx-js-editor, SuperDoc, Syncfusion, Nutrient, and more. Features, licensing, and trade-offs.