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

# Editing & Refining Documents

> How to edit and perfect your BuildBetter-generated documents

BuildBetter's document editor provides a rich text editing experience with AI assistance. Edit, refine, and perfect your generated documents using a familiar word-processor-style interface.

## Document Editor

The document editor provides:

### Rich Text Formatting

* **Text styles**: Bold, Italic, Strikethrough
* **Headings**: H1, H2, H3 for document structure
* **Lists**: Bulleted and numbered lists
* **Tables**: Create and edit tables
* **Links**: Add hyperlinks to external resources

### Editing Interface

* **Bubble menu**: Format selected text with a floating toolbar
* **Auto-save**: Changes are saved automatically as you type (debounced)
* **Real-time updates**: See your changes reflected immediately
* **Markdown storage**: Document content is stored internally as markdown

<Note>
  Select any text to see the formatting bubble menu appear with options for Bold, Italic, Strikethrough, and Headings.
</Note>

## Basic Editing

### Text Editing

* Click anywhere in the document to edit
* Type naturally as in any word processor
* Use keyboard shortcuts for common formatting
* Changes save automatically

### Document Title

* Click the title at the top to edit
* Title updates automatically as you type
* Clear, descriptive titles help with organization

### Document Description

The focus/description field is used during generation and can be updated when regenerating the document.

## Formatting Tools

### Text Formatting Toolbar

When you select text, a bubble menu appears with:

* **Bold** - Make text bold
* **Italic** - Italicize text
* **Strikethrough** - Strike through text
* **H1** - Convert to large heading
* **H2** - Convert to medium heading
* **H3** - Convert to small heading

### Structure Elements

Available in the editor:

* Paragraphs
* Headings (H1-H3)
* Bulleted lists
* Numbered lists
* Tables (with headers and cells)
* Horizontal rules

## Document Actions

### Copy Options

* **Copy Document**: Copies document content to clipboard (both HTML and plain text formats for compatibility)
* **Copy Link**: Copies the document URL for sharing

### Regeneration

* Click the regenerate button to rebuild the entire document
* Uses the same sources and settings as original generation
* Useful when source data has been updated or you want a fresh perspective

### Sharing

* Click Share to open the sharing modal
* Set document visibility (Private or Workspace)
* Share link with teammates

### Delete

* Remove documents via the More menu
* Requires confirmation to prevent accidental deletion

## Document Chat

Each document has an integrated chat panel for AI assistance:

### Features

* Ask questions about the document content
* Request specific edits or additions
* Get clarification on generated insights
* Iterate on content without full regeneration

### Usage

1. Click the chat icon in the top-right corner
2. Start a new chat or continue existing threads
3. Ask questions or request changes
4. Document context is automatically included

### Chat Management

* Multiple chat threads per document
* Threads are saved and resumable
* Delete threads when no longer needed
* View all previous chats from the panel

<Tip>
  Use document chat to make targeted improvements instead of regenerating the entire document. It's faster and preserves your manual edits.
</Tip>

## Advanced Features

### Citation Verification (Beta)

When enabled via feature flag:

* Select text in the document
* Click the verification button in the bubble menu
* Creates a dataset to validate citations against source signals
* Helps ensure accuracy of generated content

### Favorite Documents

* Mark important documents as favorites
* Quick access to frequently referenced documents
* Favorites appear at the top of document lists

## Keyboard Shortcuts

| Action | Shortcut             |
| ------ | -------------------- |
| Bold   | Cmd/Ctrl + B         |
| Italic | Cmd/Ctrl + I         |
| Undo   | Cmd/Ctrl + Z         |
| Redo   | Cmd/Ctrl + Shift + Z |

<Note>
  Use standard text editing shortcuts you're familiar with from other word processors.
</Note>

## Document Sidebar

When viewing a document, the right sidebar provides:

### Document Information

* Template type badge
* Creation date and last update
* Creator information
* Source count (calls, folders, signals)

### Quick Actions

* Favorite/unfavorite document
* Copy link
* Share document
* Delete document
* Regenerate document

### Chat Access

* Toggle chat panel on/off
* View chat thread count
* Quick access to document discussions

## Auto-Save

Documents auto-save as you edit:

* **Debounced saving**: Changes are saved 1 second after you stop typing
* **Success notifications**: Toast confirmation when saved
* **No manual save needed**: Everything is automatic
* **Safe editing**: Your work is protected

## Sharing Documents

### Visibility Levels

* **Private**: Only you can see the document
* **Workspace**: Anyone in your workspace can view
* **Shared**: Specific people you invite (via share modal)

### Share Modal

Access via the Share button to:

* Generate shareable links
* Set document permissions
* Invite specific teammates
* Control access levels

## Sharing & Export

### Copy to External Tools

1. Click **Copy Document** to copy content (HTML + plain text)
2. Paste into Google Docs, Notion, Word, Confluence, or other tools
3. Formatting is preserved when pasting into compatible applications

### Version Management

* Create new documents from the same sources for different versions
* Use descriptive titles to track iterations
* Regenerate documents when source data is updated

### Team Collaboration

* Share document links with teammates
* Use document chat to discuss changes and request edits
* Set visibility to Workspace for team access

## Best Practices

<Check>
  **Edit incrementally**: Make small changes and let auto-save protect your work
</Check>

<Check>
  **Use document chat**: Request AI assistance for improvements instead of manual rewriting
</Check>

<Check>
  **Meaningful titles**: Clear document titles help with organization and discovery
</Check>

<Check>
  **Leverage favorites**: Mark important documents for quick access
</Check>

<Check>
  **Copy before major changes**: Use Copy Document to preserve current version before significant edits
</Check>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Auto-Save Issues">
    * Check network connectivity
    * Refresh the page if saves are failing
    * Verify you have edit permissions
    * Try copying content as backup
  </Accordion>

  <Accordion title="Formatting Problems">
    * Use the bubble menu for reliable formatting
    * Refresh page if editor becomes unresponsive
    * Clear browser cache if persistent issues
    * Avoid pasting heavily formatted content from external sources
  </Accordion>

  <Accordion title="Chat Not Working">
    * Ensure document has loaded completely
    * Check network connection
    * Try refreshing the page
    * Verify workspace permissions
  </Accordion>
</AccordionGroup>

<Info>
  The document editor is continuously improved. Report issues or request features via the help menu or by contacting [support@buildbetter.app](mailto:support@buildbetter.app).
</Info>
