Skip to content

Plim

A Notion-inspired block editor for the web. A framework-agnostic core, a DOM view layer, a Markdown parser/serializer, and React bindings - small, composable, and built to embed in your own product.

Plim is a Notion-inspired block editor built as a TypeScript monorepo. It ships a framework-agnostic core, a DOM view layer, a Markdown parser/serializer, and React bindings - all small, composable, and designed to be embedded in your own product.

Framework-agnostic

The core has no DOM dependency. Bring your own view layer, or use the bundled DOM and React ones.

Composable packages

Ten focused packages - take only the layers you need, from schema to collaboration.

Sync built in

A serializable transaction ledger, OT-based collaboration, comments, and durable storage primitives.

Typed end to end

Strict TypeScript throughout, with an auto-generated API reference that never drifts from source.

PackageDescription
@plim/coreSchema, document model, transactions, validation rules, action/extension/trigger system, history, and the built-in block & mark descriptors. Runtime-agnostic - no DOM.
@plim/ledgerRecord, replay, merge, diff, and rebase transactions plus conflict resolution - the bring-your-own sync / CRDT layer. Runtime-agnostic.
@plim/transportsTiny generic duplex-channel primitives: in-memory loopback + broadcast bus, BroadcastChannelTransport, reconnecting WebSocketTransport, and mapTransport codecs. Zero-dep.
@plim/collaborationReal-time multi-peer editing on top of the ledger, presence/awareness, and version vectors - plus comments & threaded replies.
@plim/markdownParse Markdown into a Plim document and serialize back.
@plim/editorThe view layer. Mounts a Plim document into a contenteditable, owns the floating toolbar, block-handle gutter, clipboard, drag-and-drop, and the keyboard pipeline. Ships its own stylesheet.
@plim/reactReact bindings: <PlimEditor>, useEditorHandle(), slash-command and mention extensions, and a bridge for defining blocks with toComponent.
@plim/htmlHeadless, SSR-safe serializer: render a document model to an HTML string with overridable renderers and escaped-by-default output. Optional.
@plim/storageDurable persistence primitives: pluggable StorageAdapters (memory, localStorage, IndexedDB, transport) plus debounced snapshot autosave. Optional.
@plim/test-utilsRunner-agnostic testing helpers: fluent document/mark builders, a headless createTestEditor, applyTx, and inspectors/assertions.