Doc editor. A TypeScript SDK for a pageless document editor built on ProseMirror. Range comments and operational-transform collaboration are first-class.
Documentation · Live demo · npm
Pageless Docs chrome with a classic toolbar, document styles, and light / dark themes. Try the live demo.
pnpm add @deditor/react @deditor/preset-docs @deditor/collabPeer: react >= 18.
import { DocEditor } from '@deditor/react'
import '@deditor/react/style.css'
export function App() {
return <DocEditor />
}JSON is the document format. Quill Delta is not supported.
| Package | Role |
|---|---|
@deditor/core |
Framework-agnostic Editor, schema merge, CommentStore, sanitizers, shared wire types |
@deditor/preset-docs |
Docs schema, commands, keymap, tables, lists, search, comment marks, document CSS |
@deditor/collab |
OT via prosemirror-collab (not Yjs), comment FIFO, WebSocket provider |
@deditor/react |
<DocEditor /> — toolbar, bubbles, find, comment sidebar |
@deditor/react depends on the other three. Collaboration is optional as a feature: omit the collab prop. Headless / Vue integrators skip @deditor/react and call editor.mount themselves.
import { createWsProvider } from '@deditor/collab'
import { DocEditor } from '@deditor/react'
const provider = createWsProvider({
url: 'wss://your-authority.example',
roomId: 'doc-1',
user: { id: 'u1', name: 'Ada', color: '#4f81bd' },
})
<DocEditor collab={provider} currentUser={{ id: 'u1', name: 'Ada', color: '#4f81bd' }} />The sample apps/collab-server is an in-memory authority for demos. Do not ship it as production.
Anchors are comment marks on the document. Bodies live in CommentStore and move as incremental CommentOps. There is no suggestion mode.
pnpm build— build the four packagespnpm test— Vitest on packagespnpm lint— ESLintpnpm dev:demo— Vite playground at/and/collabpnpm dev:collab— in-memory WebSocket authority (not production)pnpm dev:docs— VitePress
GitHub Actions publishes @deditor/* to npm on a version tag (v0.6.0, …). Repo secret NPM_TOKEN must be able to publish the @deditor org.
git tag v0.6.0
git push origin v0.6.0MIT

