# Contract Redlines block

> Tiptap Contract Redline Editor With Suggesting Mode and a Sticky Review Margin

Chromeless contract editor on Tiptap where edits become attributed insert, delete and replace suggestions: accept or reject each or all, step through changes, Final and Original previews, sticky toolbar header. For redlines, legal review, approvals.

- 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-3
- MCP: `get_block("rich-text-editor-3")`
- Built with: Alert Dialog, Avatar, Badge, Button, Button Group, Card, Checkbox, Dropdown Menu, Empty, Field, Input Group, Item, Kbd, Popover, Select, Separator, Sheet, Skeleton, Toggle, Toggle Group, Tooltip
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

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

## Agent notes

- `CONTRACT`, `CONTRACT_META` and `PEOPLE` in data.tsx are the demo MSA, its header facts and the three reviewers behind the seeded suggestions
- `CURRENT_AUTHOR` signs new suggestions and `currentTime` returns the fixed `DEMO_NOW`, so new changes carry the demo time
- `ContractEditor` takes only `className` and `content`, and `onUpdate` just restamps the header, so persist the redlines yourself

## When not to use

- Teammates co-edit one draft live and need to see each other's carets: use [Collaborative Editor](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-4.md) (`get_block("rich-text-editor-4")`)
- Suggestions come from an AI assistant that streams its edits into the page: use [AI Writing Assistant](https://web.dev.reui.io/blocks/application/rich-text-editor/rich-text-editor-5.md) (`get_block("rich-text-editor-5")`)

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

## Install

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

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