# Shadcn Rich Text Editor blocks

> Tiptap rich text editors with toolbars, slash commands and tables, a suggesting mode redline, Yjs co-editing with comments and an AI editing assistant.

- Type: Pro blocks (Application)
- Page: https://web.dev.reui.io/blocks/application/rich-text-editor
- Blocks: 5
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## When to use

- Documents written and kept inside a product: launch briefs, wiki pages, contracts, specs and plans
- Review on the text itself, through tracked suggestions to accept or reject or threaded comments
- Shared writing with live teammates, or with an AI assistant whose edits arrive for review

## When not to use

- The navigation layout around your pages, with no document editing in it: use the [App Shell blocks](https://web.dev.reui.io/blocks/application/app-shell.md)
- A top bar with a title, avatars and actions above a page you already have: use the [Navbar blocks](https://web.dev.reui.io/blocks/application/navbar.md)
- A strip of formatting or alignment controls alone, with no document under it: use [Button Group](https://web.dev.reui.io/components/button-group.md) (`get_component("button-group")`)

## Agent notes

- Each page.tsx wraps the root in an `h-svh` or `min-h-svh` column; inside an app shell drop it and size the root through `className`
- Every schema starts from `createRichTextExtensions` in rich-text-extensions.ts; extend that list and keep it stable, as `useEditor` compares it by identity
- Document typography is `RICH_TEXT_PROSE` in rich-text-content.tsx, built on theme tokens; restyle headings, lists, code and links there

## Third-party libraries

- Tiptap v3: [API reference](https://tiptap.dev/docs/editor/api/editor), [docs](https://tiptap.dev/docs/editor/getting-started/install/react), [llms.txt](https://tiptap.dev/llms.txt), used by 5 of 5 blocks
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started), used by 5 of 5 blocks
- Yjs v13: [API reference](https://docs.yjs.dev/api/y.doc), [docs](https://docs.yjs.dev/), [llms.txt](https://docs.yjs.dev/llms.txt), used by 1 of 5 blocks
- Motion v12: [API reference](https://motion.dev/docs/react-motion-component), [docs](https://motion.dev/docs/react), used by 1 of 5 blocks (the docs follow the latest Motion, with no React API break since v12)
- cmdk v1: [API reference](https://github.com/dip/cmdk#parts-and-styling), [docs](https://github.com/dip/cmdk), used by 1 of 5 blocks

## Blocks

- [Document Editor](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-1.md): Tiptap Document Editor With Formatting Toolbar, Link Bubble and Task Lists. Best for a bounded Frame that scrolls its page inside, with a word, character and read time footer and a Keyboard Shortcuts popover.
- [Wiki Page Editor](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-2.md): Tiptap Page Editor With Slash Commands, Mentions, Tables and an Outline Rail. Best for a hover gutter that adds, drags, duplicates, moves and converts blocks, plus Full Width, Small Text and Lock Page toggles.
- [Contract Redlines](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-3.md): Tiptap Contract Redline Editor With Suggesting Mode and a Sticky Review Margin. Best for changes from 3 reviewers with an avatar, name and time per row, an Editing, Suggesting and Viewing select and a margin that becomes a Sheet.
- [Collaborative Editor](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-4.md): Tiptap Collaborative Editor With Live Cursors, Presence, Offline Merge and Comments. Best for a swappable Yjs room with scripted teammates to follow, an Online switch, comment threads to reply to or resolve and a session replay.
- [AI Writing Assistant](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-5.md): Tiptap AI Document Assistant With Streamed Suggestions, Step Trace and Review Dock. Best for an agent dock that maps typed asks to tasks by keyword, streams Edit and Add tasks as tracked edits and answers Review with findings.

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
