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

# Editor

> Working in the Docsiv document editor — formatting, slash commands, AI editing, media, and more.

The Docsiv document editor opens when you create or click into any Document or Contract. It supports rich formatting, inline AI, real-time collaboration, and a wide range of content blocks.

Changes save automatically as you type. You never need to click a save button.

<Note>
  The Sheet editor (spreadsheets) and Presentation editor (decks) have their own interfaces. This page covers the Document and Contract editor only.
</Note>

## Slash commands

Type `/` anywhere in the editor to open the command palette. Start typing to filter the list and press `Enter` or click to insert a block.

Common slash commands include headings, bullet lists, tables, code blocks, callouts, images, videos, math, drawings, and AI generation.

## Formatting

<AccordionGroup>
  <Accordion title="Text formatting">
    Use the floating toolbar that appears when you select text, or keyboard shortcuts:

    | Format            | Shortcut           |
    | ----------------- | ------------------ |
    | **Bold**          | `Ctrl+B` / `Cmd+B` |
    | *Italic*          | `Ctrl+I` / `Cmd+I` |
    | Underline         | `Ctrl+U` / `Cmd+U` |
    | ~~Strikethrough~~ | —                  |
    | `Inline code`     | `Ctrl+E` / `Cmd+E` |
    | Link              | `Ctrl+K` / `Cmd+K` |

    Highlight text and use the color picker in the toolbar to set text color or background highlight.
  </Accordion>

  <Accordion title="Headings">
    Type `/h1`, `/h2`, or `/h3` from the slash menu, or use Markdown shortcuts:

    * `# ` (space after hash) → Heading 1
    * `## ` → Heading 2
    * `### ` → Heading 3
  </Accordion>

  <Accordion title="Lists">
    * **Bullet list** — type `- ` or `/bullet`
    * **Numbered list** — type `1. ` or `/numbered`
    * **Todo list** — type `/todo` to add checkboxes
    * **Toggle list** — type `/toggle` to create collapsible items

    Press `Tab` to indent a list item and create nested levels.
  </Accordion>

  <Accordion title="Tables">
    Insert a table with `/table`. Use the table toolbar that appears on hover to add or remove rows and columns, merge cells, or delete the table. Navigation works with `Tab` to move forward and `Shift+Tab` to move back.
  </Accordion>

  <Accordion title="Code blocks">
    Insert with `/code`. Select the language from the dropdown at the top of the block for syntax highlighting. Supports most common programming and markup languages.
  </Accordion>

  <Accordion title="Callouts">
    Insert with `/callout`. Callout blocks stand out visually and support an icon and background color. Use them for notes, warnings, or tips inside your documents.
  </Accordion>

  <Accordion title="Table of contents">
    Insert with `/toc`. Docsiv automatically generates a linked outline from all headings in the document and updates it as you write.
  </Accordion>
</AccordionGroup>

## Media and embeds

<Tabs>
  <Tab title="Images">
    Insert an image with `/image`. You can:

    * Upload a file from your computer
    * Paste an image URL

    After inserting, drag the resize handles to adjust the width. Click the image to see alignment and caption options.
  </Tab>

  <Tab title="Video">
    Insert with `/video` to upload a video file directly, or use `/youtube` to embed a YouTube video by URL. Embedded videos play inline in the document.
  </Tab>

  <Tab title="Drawings">
    Insert with `/excalidraw` to open an Excalidraw canvas inside the document. Draw diagrams, wireframes, or sketches directly. Changes save back into the document automatically when you close the canvas.
  </Tab>

  <Tab title="Math">
    Insert a math block with `/math`. Write LaTeX expressions and the editor renders them as formatted equations. Inline math is also supported.
  </Tab>

  <Tab title="Other">
    * **Date picker** — insert with `/date` to embed a formatted date that updates when edited.
    * **Emoji** — type `:` followed by an emoji name to open the emoji picker.
    * **Horizontal rule** — type `---` or use `/divider`.
    * **Column layout** — use `/columns` to create a two- or three-column layout.
  </Tab>
</Tabs>

## AI features

<AccordionGroup>
  <Accordion title="Inline AI editing">
    Select any text in the document, then click the **AI** button that appears in the floating toolbar. From there you can:

    * **Improve writing** — rewrite the selection for clarity and tone
    * **Make shorter** or **Make longer**
    * **Fix grammar**
    * **Continue writing** — extend the selection in the same voice

    The AI response appears as a suggestion you can accept, discard, or regenerate.
  </Accordion>

  <Accordion title="AI generation from slash command">
    Type `/ai` in the editor to open the AI generation prompt. Describe what you want — a section, a paragraph, a table — and press `Enter`. The generated content is inserted at the cursor position.
  </Accordion>
</AccordionGroup>

## Comments and suggestions

<AccordionGroup>
  <Accordion title="Adding a comment">
    Select text and click the **comment** icon in the floating toolbar, or press `Ctrl+Alt+M` / `Cmd+Option+M`. Type your comment and press `Enter` to save. Comments appear in the margin and are visible to all collaborators with at least Comment access.
  </Accordion>

  <Accordion title="Suggestions (tracked changes)">
    Collaborators with **Commenter** access can suggest edits rather than making direct changes. Suggestions appear highlighted in the document. As the document owner, you can accept or reject each suggestion from the suggestion panel.
  </Accordion>

  <Accordion title="Resolving comments">
    Click the checkmark on any comment thread to mark it as resolved. Resolved comments are hidden by default but can be viewed by toggling **Show resolved** in the comments panel.
  </Accordion>
</AccordionGroup>

## Mentions

Type `@` to mention a workspace member or a client. Mentions create a notification for the person mentioned.

## Draggable blocks

Every block in the editor has a drag handle (⠿) that appears on hover at the left edge. Drag it to reorder blocks anywhere in the document.

## Version history

Open the **more options** menu (⋯) in the editor toolbar and choose **Doc history**. Docsiv shows a timestamped list of saved versions. Click **Restore** next to any version to roll the document back to that point.

<Note>
  Versions are created automatically as you edit. You do not need to manually save snapshots.
</Note>

## Exporting

Open the **more options** menu (⋯) and choose **Print & export** to access:

* **PDF** — exports a rendered PDF of the document
* **DOCX** — exports a Microsoft Word file
* **Markdown** — exports the document as plain Markdown text
* **Print** — opens the browser print dialog

## Keyboard shortcuts reference

| Action        | Shortcut                       |
| ------------- | ------------------------------ |
| Bold          | `Ctrl+B` / `Cmd+B`             |
| Italic        | `Ctrl+I` / `Cmd+I`             |
| Underline     | `Ctrl+U` / `Cmd+U`             |
| Inline code   | `Ctrl+E` / `Cmd+E`             |
| Link          | `Ctrl+K` / `Cmd+K`             |
| Add comment   | `Ctrl+Alt+M` / `Cmd+Option+M`  |
| Slash command | `/`                            |
| Undo          | `Ctrl+Z` / `Cmd+Z`             |
| Redo          | `Ctrl+Shift+Z` / `Cmd+Shift+Z` |
