Skip to content

giantanalyticsai/docx-editor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

592 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOCX JS Editor

npm version npm downloads license Live Demo Documentation

@giantanalyticsai/docx-js-editor

Open-source WYSIWYG DOCX editor for the browser. No server required. Live demo | Documentation

For AI agents: see the Agent Reference for comprehensive API docs, code examples, and integration patterns.

DOCX JS Editor screenshot

  • WYSIWYG editing with Word fidelity — formatting, tables, images, hyperlinks
  • Track changes (suggestion mode) with accept/reject
  • Comments with replies, resolve/reopen, scroll-to-highlight
  • Plugin system, undo/redo, find & replace, print preview
  • Client-side only, zero server dependencies

Quick Start

npm install @giantanalyticsai/docx-js-editor
import { useRef } from 'react';
import { DocxEditor, type DocxEditorRef } from '@giantanalyticsai/docx-js-editor';
import '@giantanalyticsai/docx-js-editor/styles.css';

function Editor({ file }: { file: ArrayBuffer }) {
  const editorRef = useRef<DocxEditorRef>(null);
  return <DocxEditor ref={editorRef} documentBuffer={file} mode="editing" onChange={() => {}} />;
}

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

Packages

Package Description
@giantanalyticsai/docx-js-editor React UI — toolbar, paged editor, plugins. Install this.
@giantanalyticsai/docx-editor-vue Vue.js scaffold — contributions welcome

Plugins

import { DocxEditor, PluginHost, templatePlugin } from '@giantanalyticsai/docx-js-editor';

<PluginHost plugins={[templatePlugin]}>
  <DocxEditor documentBuffer={file} />
</PluginHost>;

See the plugin documentation for the full plugin API.

Development

bun install
bun run dev        # localhost:5173
bun run build
bun run typecheck

Examples: Vite | Next.js | Remix | Astro | Vue

Documentation | Props & Ref Methods | Plugins | Architecture

License

MIT

About

React DOCX editor

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 98.2%
  • Other 1.8%