JSPM

@zeke-02/docx-editor

0.0.35
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q73826F
  • License MIT

A browser-based DOCX template editor with variable insertion support

Package Exports

  • @zeke-02/docx-editor
  • @zeke-02/docx-editor/core
  • @zeke-02/docx-editor/core-plugins
  • @zeke-02/docx-editor/headless
  • @zeke-02/docx-editor/i18n/de.json
  • @zeke-02/docx-editor/i18n/en.json
  • @zeke-02/docx-editor/i18n/pl.json
  • @zeke-02/docx-editor/mcp
  • @zeke-02/docx-editor/react
  • @zeke-02/docx-editor/styles.css
  • @zeke-02/docx-editor/ui

Readme

DOCX JS Editor

npm version npm downloads license Live Demo Documentation

@eigenpal/docx-js-editor

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

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
  • Internationalization (i18n) - community-contributed translations welcome
  • Plugin system, undo/redo, find & replace, print preview
  • Client-side only, zero server dependencies

Quick Start

npm install @eigenpal/docx-js-editor
import { useRef } from 'react';
import { DocxEditor, type DocxEditorRef } from '@eigenpal/docx-js-editor';
import '@eigenpal/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
@eigenpal/docx-js-editor React UI — toolbar, paged editor, plugins. Install this.
@eigenpal/docx-editor-vue Vue.js scaffold — contributions welcome

Plugins

import { DocxEditor, PluginHost, templatePlugin } from '@eigenpal/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

Translations

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 coverage

License

MIT