$ show ueberdosis/tiptap
Tiptap is a headless, framework-agnostic rich text editor built on ProseMirror. It provides a core editor engine with an extension system for nodes, marks, and plugins. The architecture is a monorepo with separate packages for core, framework bindings (React, Vue), HTML/markdown conversion, static rendering, and dozens of first-party extensions. Key entry points are the Editor class, Extension/Node/Mark factories, and framework-specific components like EditorContent and useEditor. Data flows: user input → ProseMirror state → extension hooks → commands → transaction → view update. External dependencies: ProseMirror libraries, Yjs for collaboration, lowlight for code highlighting, Floating UI for popups. The codebase demonstrates high craftsmanship with a well-designed extension API, comprehensive test coverage, and reusable patterns for decoration management, markdown serialization, suggestion autocomplete, and static rendering.
The LLM identified 5 files worth highlighting for reuse:
Implements a high-level decoration API over ProseMirror decorations, supporting incremental rebuild ranges, widget keying, and lifecycle management. Demonstrates deep ProseMirror integration and is reusable for any extension needing custom decorations.
Factory function for creating markdown serialization specs for block-level custom nodes. Handles attribute serialization, nested content rendering, and Pandoc-style syntax. Reusable across any custom node extension needing markdown support.
Async suggestion plugin with debounce, AbortController for cancellation, and Floating UI integration for popup positioning. Handles lifecycle (open, close, dismiss) and is reusable for mentions, emoji, or any autocomplete feature.
Utility for merging HTML attributes with class/style deduplication and XSS protection. Used across extensions for renderHTML. Demonstrates careful handling of edge cases and is safely extractable.
Generic recursive renderer that converts ProseMirror JSONContent to React elements, HTML strings, or Markdown. Supports custom node/mark mappings and fallback for unknown types. Reusable for server-side rendering without an editor instance.