百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
docx-editor

docx-editor

> 前端框架
免费

一个开源的 WYSIWYG .docx 编辑器库,适用于 React 和 Vue,支持标准 OOXML、跟踪修改、

332 stars0 点赞7 次浏览
访问官网GitHub

工具介绍

一个开源的 WYSIWYG .docx 编辑器库,适用于 React 和 Vue,支持标准 OOXML、跟踪修改、

Open-source WYSIWYG .docx editor for React and Vue. Word-faithful pagination, tracked changes, comments, and lossless round-trip: untouched content and unsupported OOXML survive the save. Live demo | Documentation | Roadmap

Quick start

bash
npm install @docx-editor.dev/react @docx-editor.dev/core   # React
npm install @docx-editor.dev/vue @docx-editor.dev/core     # Vue

See the React or Vue quick start.

For Node.js, use ^20.16.0 || >=22.3.0. Browser applications can use the packages with their build tool.

Packages

Package Description Docs
@docx-editor.dev/react React editor components and hooks. Docs
@docx-editor.dev/vue Vue 3 editor components and composables. Docs
@docx-editor.dev/core DOCX parsing, editing, and rendering. Docs
@docx-editor.dev/i18n Translations and locale types. Docs
@docx-editor.dev/fonts Open-licensed substitutes for Word fonts. Docs
@docx-editor.dev/docx-to-markdown Convert DOCX to Markdown with page and image output. Docs
@docx-editor.dev/pro Tracked changes, comments, collaboration, and custom nodes. Docs
@docx-editor.dev/editor-api Office.js-compatible API for browser and server editing. Docs

@docx-editor.dev/editor-api and @docx-editor.dev/pro are licensed under the EigenPal Pro License (editor-api, pro), and you can compare and buy license and support levels on the pricing page.

If you fork an adapter, depend on @docx-editor.dev/core to receive engine fixes.

React

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

export function App() {
  const [doc, setDoc] = useState();

  return (
    

    
  );
}

Next.js / SSR: Use dynamic import. The editor requires the DOM.

Full docs: React adapter · Props and ref methods.

Vue

xml

  

  

Nuxt / SSR: Load the editor in a client-only component. The editor requires the DOM.

Full docs: Vue adapter · Props and ref methods.

Font measurement

Pass usable font bytes for Word-accurate line and page breaks. Without them, the editor uses fallback measurement that does not guarantee Word-compatible layout.

Use packagedFonts() from @docx-editor.dev/fonts for packaged substitutes. Use customFonts() from @docx-editor.dev/core/editor for your own font files. Add googleFonts() when your application accepts third-party font requests.

See Fonts and measurement.

Development

bash
bun install
bun run dev          # localhost:5173
bun run dev:markdown # Markdown demo: localhost:5177
bun run build
bun run typecheck

Try unreleased changes in the preview of main.

Examples: Vite | DOCX to Markdown | Next.js | Remix | Astro | Vue | Collaboration | Server agent review

Documentation | React props and ref methods | Vue props and ref methods

Contributing

Contributions welcome. See CONTRIBUTING.md for setup, tests, and the one-time CLA signature.

Translations

Locale Language
en English
de German
fr French
he Hebrew
hi Hindi
id Indonesian
pl Polish
pt-BR Portuguese (Brazil)
tr Turkish
zh-CN Chinese (Simplified)

To add a locale, see the i18n contribution guide.

bash
bun run i18n:new de      # scaffold German locale
bun run i18n:status      # check translation coverage

License

This repository is licensed under Apache 2.0, except packages/editor-api/ and packages/pro/, which are licensed under the EigenPal Pro License (editor-api, pro); you can compare and buy license and support levels on the pricing page.

Commercial support

[!TIP] Questions or custom features? Email [email protected].

Roadmap

See the public roadmap for planned work and priorities.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

docxdocx-editoreditor

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年9月9日
最后更新2026年9月18日
分类前端框架
定价免费

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架