BlockSuite provides a headless editing framework and web components for building block-based, collaborative document and canvas editors. It powers editors such as PageEditor and EdgelessEditor and originated from AFFiNE.
Overview
BlockSuite is a toolkit for building editors and collaborative applications on the web. It ships a vanilla framework runtime plus reusable UI components implemented as native web components, so they work with React or other front-end stacks.
Preset editors include PageEditor, a block-based document editor, and EdgelessEditor, a graphics editor with canvas rendering while sharing rich-text features with PageEditor. You can reuse AFFiNE-style editing capabilities or assemble new editors from the framework.
The stack is organized into a data layer built on Yjs for collaborative document state, inline rich text primitives, block modeling libraries, default block implementations, and plug-and-play preset editors with auxiliary fragments. Features described include custom blocks, real-time collaboration, command-style editing logic, and import or export via snapshots and transformers.
BlockSuite is maintained separately from AFFiNE while serving as its editing foundation, similar in spirit to how Monaco relates to VS Code but with an independent codebase.
Key features
- PageEditor block document mode
- EdgelessEditor canvas mode
- Yjs-based collaborative documents
- Web component UI pieces
- Custom blocks and embeds
- Markdown and HTML transforms
- Multi-document state scheduling
- Command-based editing API
Use cases
- Building Notion-style editors
- Collaborative knowledge apps
- Custom block-based UIs
- Local-first co-editing
- Canvas plus document hybrids