# Wiki Page Editor block

> Tiptap Page Editor With Slash Commands, Mentions, Tables and an Outline Rail

Fluid block page editor on Tiptap that fills any app shell: slash command menu, @ mentions, resizable tables with a row and column bar, a live contents block and a right-edge outline rail that opens on hover. For wikis, docs, playbooks.

- Type: Pro block
- Category: [Rich Text Editor](https://web.dev.reui.io/blocks/application/rich-text-editor.md)
- Page: https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-2
- MCP: `get_block("rich-text-editor-2")`
- Built with: Alert Dialog, Avatar, Badge, Button, Button Group, Card, Checkbox, Command, Dropdown Menu, Field, Icon Tile, Input Group, Kbd, Popover, Separator, Skeleton, Toggle, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

A hover gutter that adds, drags, duplicates, moves and converts blocks, plus Full Width, Small Text and Lock Page toggles

## Agent notes

- `PAGE`, `PAGE_META` and `PEOPLE` in data.ts are the demo playbook, its title and the teammates; mentions and `TIERS` owners store `PEOPLE` ids
- `createRichTextMention` gets `PEOPLE` at module scope in `EXTENSIONS`, so the @ list is fixed at load and shows at most `MAX_MATCHES`
- Full Width, Small Text and Lock Page are local state (`fullWidth`, `smallText`, `setEditable`) and reset on reload

## When not to use

- A fixed formatting toolbar over a bounded document with a live word count: use [Document Editor](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-1.md) (`get_block("rich-text-editor-1")`)
- Changes need accepting or rejecting one by one, each tagged to its author: use [Contract Redlines](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-3.md) (`get_block("rich-text-editor-3")`)

## 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)
- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)
- cmdk v1: [API reference](https://github.com/dip/cmdk#parts-and-styling), [docs](https://github.com/dip/cmdk), through shadcn Command

## Install

```bash
npx shadcn@latest add @reui/rich-text-editor-2
```

## About Rich Text Editor blocks

### 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

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.
