Thanks for your interest in contributing! This guide will help you get started.
# Clone the repo
git clone https://github.com/eigenpal/docx-js-editor.git
cd docx-js-editor
# Install dependencies
bun install
# Start the dev server
bun run dev
# Open http://localhost:5173# Type checking (fast, run often)
bun run typecheck
# Unit tests
bun test
# E2E tests (requires Playwright browsers)
npx playwright install --with-deps chromium
npx playwright test --timeout=30000 --workers=4
# Single test file
npx playwright test tests/formatting.spec.ts --timeout=30000The project uses ESLint and Prettier with pre-commit hooks (Husky + lint-staged), so formatting is handled automatically on commit.
# Manual lint/format
bun run lint:fix
bun run format- Fork the repository and create a branch from
main - Read the code before modifying it — understand the dual rendering system (see Architecture)
- Make your changes — keep them focused and minimal
- Add/update tests for your changes (see
e2e/for E2E tests) - Verify everything works:
bun run typecheck && bun test && bun run build
- Submit a PR against
main
The editor has two rendering systems:
- Hidden ProseMirror — the real editing state (selection, undo/redo, keyboard input)
- Visible Pages (layout-painter) — what the user sees, rebuilt from PM state on every change
See docs/ARCHITECTURE.md for the full architecture, and docs/EXTENSIONS.md for the extension system.
Open an issue at github.com/eigenpal/docx-js-editor/issues with:
- Steps to reproduce
- Expected vs actual behavior
- Attach a
.docxfile if relevant (remove sensitive content first)
By contributing, you agree that your contributions will be licensed under the MIT License.