No description
  • TypeScript 92.6%
  • CSS 4.6%
  • JavaScript 2.6%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-30 11:19:07 +02:00
.husky Quality improvements: logo, pre-commit, tests, README, Pages deploy 2026-07-15 20:42:24 +02:00
css mobile: width correction 2026-07-29 23:11:37 +02:00
demo don't slugify username in static editor 2026-07-29 22:54:57 +02:00
locale Add styling + translations 2026-07-24 05:15:54 +02:00
scripts 0.2.38 2026-07-30 11:19:07 +02:00
src 0.2.38 2026-07-30 11:19:07 +02:00
static Add styling + translations 2026-07-24 05:15:54 +02:00
test 0.2.38 2026-07-30 11:19:07 +02:00
.gitignore initial import 2026-07-13 22:28:39 +02:00
.prettierignore Move documentation to pages 2026-07-28 22:16:23 +02:00
.prettierrc.json initial import 2026-07-13 22:28:39 +02:00
AGENTS.md turn demo into a method to allow creation of statically served editor 2026-07-28 19:00:03 +02:00
eslint.config.mjs demo: make it able to run citations 2026-07-26 08:53:14 +02:00
jest.config.js 0.1.47 2026-07-19 23:18:27 +02:00
LICENSE initial import 2026-07-13 22:28:39 +02:00
logo.svg Quality improvements: logo, pre-commit, tests, README, Pages deploy 2026-07-15 20:42:24 +02:00
package.json 0.2.38 2026-07-30 11:19:07 +02:00
pnpm-lock.yaml 0.2.38 2026-07-30 11:19:07 +02:00
README.md Move documentation to pages 2026-07-28 22:16:23 +02:00
tsconfig.json Convert source to TypeScript with real typings 2026-07-15 07:56:34 +02:00

@fiduswriter/editor

@fiduswriter/editor

The ProseMirror-based editor component of Fidus Writer


What it does

The main browser-based collaborative editor for Fidus Writer. Built on ProseMirror, it provides real-time collaboration, comments, tracked changes, footnotes, citations, end-to-end encryption (E2EE), menus, dialogs, and clipboard import/export.

Key features

  • Real-time collaboration — WebSocket-based collaborative editing with participant carets, diffs, and versioning
  • Track changes — Accept/reject individual changes with full change history
  • Comments — Threaded commenting with annotation marks and resolution
  • Footnotes — Inline footnote editing with proper layout
  • Citations — Citeproc-js based citation rendering with bibliography generation
  • E2EE — End-to-end encryption with key management and passphrase support
  • Clipboard — Paste from Word, LibreOffice, Google Docs with format preservation
  • Tables, figures & equations — Full editing support for tables, images, math formulas, and code blocks

Installation

npm install @fiduswriter/editor

Usage

The library can be used in two modes: static (no backend server, like the standalone demo) or server-backed (the classic Fidus Writer Django setup).

For a quick start without a backend, import createStaticEditor from the @fiduswriter/editor/static_editor subpath:

import {createStaticEditor} from "@fiduswriter/editor/static_editor"

const editor = await createStaticEditor({
    locale: "en",
    username: "Demo User",
    documentData: async () => ({doc, doc_info, time: Date.now()}),
    documentStyles: [ /* style fixtures */ ],
    exportTemplates: [ /* export template fixtures */ ],
    documentTemplates: { /* document template fixtures */ }
})

Full API documentation, configuration options, and a complete server-backed usage example are available on the project site:

https://fiduswriter.codeberg.page/fiduswriter-editor-js/

Demo

A standalone browser demo is published on Codeberg Pages:

https://fiduswriter.codeberg.page/fiduswriter-editor-js/editor/

The demo loads the editor without a Django backend. On startup it lets you choose a language, import an existing document, or start from a default template. Changes are saved locally and can be downloaded as a .fidus file.

Development

npm install          # Install dependencies
npm run build        # Compile TypeScript to dist/
npm run typecheck    # Check types without emitting
npm run lint         # Lint with ESLint
npm run format:check # Check formatting with Prettier
npm test             # Run the test suite

License

AGPL-3.0 — see LICENSE for details.