> ## Documentation Index
> Fetch the complete documentation index at: https://docs.productgraph.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Editor

> A powerful editor designed for writing clear, structured product documentation

The Editor is the primary interface for creating and editing content in Product Graph. Built on a modern rich-text foundation, it provides a distraction-free writing experience with powerful formatting tools, AI assistance, and seamless collaboration.

## AI-Powered Writing

The editor integrates AI assistance directly into your writing workflow.

### Selection-Based Editing

Highlight specific text to access AI-powered editing:

* **Expand**: Elaborate on selected content
* **Summarize**: Condense lengthy passages
* **Rewrite**: Improve clarity or tone
* **Custom instructions**: Provide specific guidance for how to modify the selection

The AI generates suggestions as tracked changes, allowing you to review, accept, or reject each modification.

## Change Tracking & Review

Every AI-generated edit is presented as a tracked change for your review. This ensures you always have full control over what content makes it into your documents—nothing is applied silently.

### Visual Change Indicators

Changes are displayed inline with clear visual formatting:

| Change Type  | Visual Style      | Description                                 |
| ------------ | ----------------- | ------------------------------------------- |
| Insertion    | Green highlight   | New content added by AI                     |
| Deletion     | Red strikethrough | Content the AI proposes removing            |
| Modification | Blue highlight    | Updated content that replaces existing text |

### Change Navigation

| Action          | Keyboard Shortcut    | Description                    |
| --------------- | -------------------- | ------------------------------ |
| Next change     | `⌘/Ctrl + Shift + .` | Jump to the next changeset     |
| Previous change | `⌘/Ctrl + Shift + ,` | Jump to the previous changeset |

### Accepting and Rejecting Changes

Review each change individually or handle them all at once:

| Action        | Keyboard Shortcut    | Description                                   |
| ------------- | -------------------- | --------------------------------------------- |
| Accept change | `⌘/Ctrl + Shift + A` | Apply the selected change permanently         |
| Reject change | `⌘/Ctrl + Shift + R` | Discard the selected change, keeping original |
| Accept all    | `⌘/Ctrl + Enter`     | Apply all remaining changes                   |
| Reject all    | `Escape`             | Discard all remaining changes                 |

### Change Tracking in Collaboration

When multiple users are viewing a document during AI generation:

* All users see the same tracked changes in real-time
* Any user can accept or reject changes
* The document state stays synchronized across all sessions

This makes it easy for teams to collaboratively review AI-generated content.

## Block-Based Editing

The editor uses a block-based approach where content is organized into discrete blocks that can be easily created, rearranged, and formatted.

### Quick Insertion with Slash Commands

Type `/` anywhere to open the command menu. Search or browse available blocks and formatting options:

<CardGroup cols={2}>
  <Card title="Text Formatting" icon="text">
    Paragraph, bold, italic, underline, strikethrough, superscript, subscript,
    and inline code
  </Card>

  <Card title="Headings" icon="heading">
    Multiple heading levels (H2–H5) for organizing content hierarchically
  </Card>

  <Card title="Lists" icon="list">
    Bullet lists and numbered lists for structured information
  </Card>

  <Card title="Code Blocks" icon="code">
    Syntax-highlighted code blocks for technical documentation
  </Card>

  <Card title="Tables" icon="table">
    Insert tables with customizable rows and columns
  </Card>

  <Card title="Images" icon="image">
    Upload images directly or drag and drop from your desktop
  </Card>

  <Card title="Blockquotes" icon="quote-left">
    Highlight important quotes or callouts
  </Card>

  <Card title="Horizontal Rules" icon="minus">
    Visual dividers to separate content sections
  </Card>
</CardGroup>

## Text Formatting

Apply rich formatting to your text using keyboard shortcuts or the formatting toolbar.

### Inline Formatting

| Format        | Keyboard Shortcut    | Description            |
| ------------- | -------------------- | ---------------------- |
| Bold          | `⌘/Ctrl + B`         | Make text stand out    |
| Italic        | `⌘/Ctrl + I`         | Emphasize text         |
| Underline     | `⌘/Ctrl + U`         | Underline text         |
| Strikethrough | `⌘/Ctrl + Shift + X` | Cross out text         |
| Code          | `⌘/Ctrl + E`         | Inline code formatting |

### Block Formatting

| Block Type | Keyboard Shortcut  | Description            |
| ---------- | ------------------ | ---------------------- |
| Heading 2  | `⌘/Ctrl + Alt + 2` | Main section headings  |
| Heading 3  | `⌘/Ctrl + Alt + 3` | Subsection headings    |
| Heading 4  | `⌘/Ctrl + Alt + 4` | Minor section headings |
| Heading 5  | `⌘/Ctrl + Alt + 5` | Smallest heading level |

<Tip>
  Headings also support Markdown-style input. Type `##` followed by a space to
  create a heading.
</Tip>

## Artifact Mentions

Reference other artifacts in your documentation using mentions. Type `@` to search and insert links to any artifact in your product.

Mentions support all artifact types:

* Products, Capabilities, Features, Requirements, Acceptance Criteria
* User Types, Core Entities, Projects
* Documents (Pages)

When you insert a mention, it creates an inline link that readers can click to navigate directly to the referenced artifact. The editor provides autocomplete suggestions as you type, filtering by artifact name or type.

## Images

The editor provides flexible options for adding images to your documentation.

### Adding Images

* **Slash command**: Type `/image` to trigger the upload dialog
* **Drag and drop**: Drag images directly from your desktop into the editor
* **Paste**: Paste images from your clipboard (`⌘/Ctrl + V`)

### Image Controls

Once inserted, images can be:

* **Resized**: Drag the edges to adjust width (0–100% of container)
* **Aligned**: Position left, center, or right within the document

Supported formats include JPEG, PNG, GIF, and WebP.

## Links

### External Links

Highlight text and press `⌘/Ctrl + K` to add a hyperlink to an external URL. The link editor provides options to edit or remove links.

### Internal Artifact Links

Use `@mentions` to create links to other artifacts. These links are contextual and update automatically if the artifact's title changes.

## Tables

Insert tables using the `/table` command. Tables support:

* **Header rows**: The first row is styled as a header
* **Column and row management**: Add or remove rows and columns through context menus
* **Cell selection**: Click and drag to select multiple cells
* **Column resizing**: Drag column borders to adjust width

## Code Blocks

Create code blocks with `/codeblock` for displaying code snippets with syntax highlighting. The editor automatically detects the programming language and applies appropriate syntax coloring.

## Markdown Support

The editor understands common Markdown syntax as you type:

| Markdown     | Result            |
| ------------ | ----------------- |
| `# Heading`  | Creates a heading |
| `**bold**`   | Bold text         |
| `*italic*`   | Italic text       |
| `- item`     | Bullet list       |
| `1. item`    | Numbered list     |
| `` `code` `` | Inline code       |
| `---`        | Horizontal rule   |
| `> quote`    | Blockquote        |

## Version History

Every document maintains a version history. Access previous versions to:

* Review how a document evolved over time
* Compare changes between versions
* Restore earlier versions if needed

Versions are created automatically when changes are saved and can be browsed through the versions drawer.

## Autosave

Changes are automatically saved as you type. The editor uses real-time synchronization, so your work is preserved even if you close the browser or lose connection temporarily.

***

<CardGroup cols={2}>
  <Card title="Chat" href="/features/chat" icon="comments">
    Collaborate with AI to refine requirements and generate documentation.
  </Card>

  <Card title="Collaboration" href="/features/collaboration" icon="users">
    Work together in real-time with your team.
  </Card>
</CardGroup>
