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

# Writing System

> Professional-grade editor built for long-form content creation

## Overview

Cleve's writing system is designed for serious content creators who need a reliable, distraction-free environment for long-form writing. Built on [TipTap](https://tiptap.dev), the editor combines rich formatting capabilities with powerful features like auto-save, offline support, and document linking.

## Rich Text Editor

### Supported Formatting

The editor supports all essential formatting options:

* **Text Styling**: Bold, italic, underline, strikethrough, code
* **Headings**: H1 through H6 for document structure
* **Lists**: Ordered (numbered) and unordered (bulleted) lists
* **Links**: Inline hyperlinks with keyboard shortcuts
* **Code Blocks**: Syntax-highlighted code with language detection
* **Quotes**: Blockquotes for citations and emphasis
* **Horizontal Rules**: Visual separators between sections

### Keyboard Shortcuts for Formatting

| Action    | macOS           | Windows/Linux    |
| --------- | --------------- | ---------------- |
| Bold      | `Cmd + B`       | `Ctrl + B`       |
| Italic    | `Cmd + I`       | `Ctrl + I`       |
| Underline | `Cmd + U`       | `Ctrl + U`       |
| Code      | `Cmd + E`       | `Ctrl + E`       |
| Link      | `Cmd + K`       | `Ctrl + K`       |
| Heading 1 | `Cmd + Alt + 1` | `Ctrl + Alt + 1` |
| Heading 2 | `Cmd + Alt + 2` | `Ctrl + Alt + 2` |

<Tip>
  Use Markdown syntax while typing! Type `# ` for H1, `## ` for H2, `- ` for bullet lists, etc.
</Tip>

## Auto-Save System

Never lose your work again. Cleve's intelligent auto-save system ensures your content is always protected.

### How It Works

* **Automatic Saving**: Changes save automatically after **750ms** of inactivity
* **Local Persistence**: Writes to **IndexedDB** in your browser for offline access
* **Cloud Sync**: Syncs to the server when connection is available
* **Visual Feedback**: Saving indicator shows save status (Saving... → Saved)

### Manual Save

While auto-save handles most scenarios, you can force a save anytime:

```
Cmd/Ctrl + S
```

This is useful when you want to ensure changes are committed before closing the browser.

## Offline Mode

Cleve works even without an internet connection.

### Offline Capabilities

* ✅ **Create new writings** locally
* ✅ **Edit existing writings** that were previously loaded
* ✅ **Auto-save to IndexedDB** for persistence
* ✅ **View writings** from local cache
* ⏸️ **Sync paused** until connection returns

### Background Sync

When your connection returns:

1. Cleve detects the network is back
2. Queued changes upload automatically
3. Conflicts are resolved (last-write-wins with timestamps)
4. You're notified when sync completes

<Note>
  Offline changes are stored in your browser's IndexedDB. Clearing browser data will delete offline drafts.
</Note>

## Document Linking

Create bidirectional links between your writings to build a connected knowledge graph.

### Creating Links

1. Type `[[` in the editor
2. A suggestion menu appears with your other writings
3. Select a writing to create a link
4. The link appears inline: \[\[Writing Title]]

### Backlinks

When you link to another document:

* The linked document automatically tracks the **backlink**
* View all documents linking to the current one in the metadata panel
* Build a web of interconnected ideas

### Use Cases

* Reference related research in your current writing
* Connect series of articles or chapter-based content
* Build a personal wiki with cross-referenced notes

## Word & Character Counter

Track your writing progress with real-time statistics.

### Displayed Metrics

* **Word Count**: Total words in the document
* **Character Count**: Total characters (with and without spaces)
* **Reading Time**: Estimated time to read (based on 200 WPM)

### Where to Find It

The counter displays in the **editor footer** and updates instantly as you type.

## Title Extraction

The first heading (H1) in your document automatically becomes the document title.

```markdown theme={null}
# My Amazing Article

This becomes the title shown in the sidebar and search results.
```

If no H1 exists, the document is titled "Untitled" until you add one.

## Zen Mode

Enter a distraction-free fullscreen writing environment.

### Activating Zen Mode

```
Cmd/Ctrl + \
```

Or click the **Zen Mode** button in the toolbar.

### What Zen Mode Does

* **Hides all panels**: AI chat, ideas, categories—everything disappears
* **Fullscreen editor**: Your writing fills the entire screen
* **Minimal UI**: Only the editor and essential controls remain
* **Focus timer** (optional): Track your focused writing time

### Exiting Zen Mode

Press `Escape` or `Cmd/Ctrl + \` again to return to normal workspace.

<Tip>
  Combine zen mode with the writing timer to create focused Pomodoro-style writing sessions.
</Tip>

## Writing Timer

Track how long you've been writing during a session.

### Starting the Timer

1. Click the **Timer** icon in the toolbar
2. The timer starts counting up from 00:00:00
3. It appears as an overlay in the corner

### Use Cases

* **Pomodoro technique**: Write for focused 25-minute sprints
* **Daily writing goals**: Track time spent writing each day
* **Flow state tracking**: See how long you can maintain focus

The timer pauses automatically when you switch away from the writing tab.

## Public vs. Private Writings

Control who can see your content.

### Privacy Settings

* **Private** (default): Only you can see the writing
* **Public**: Anyone with the link can view (but not edit)

### Making a Writing Public

1. Open the writing
2. Click the **Share** button in the toolbar
3. Toggle **"Make Public"**
4. Copy the public URL to share

### Access Control

* Public writings are **read-only** for viewers
* Only the author can edit public writings
* Public writings are indexed by search engines (optional setting)

<Warning>
  Be careful when making writings public. Once shared, anyone with the link can view the content.
</Warning>

## Version History

See how your writing has evolved over time.

### Viewing History

1. Click the **History** button in the toolbar
2. Browse previous versions by timestamp
3. Preview changes with a diff view
4. Restore an older version if needed

### What's Tracked

* **Every auto-save** creates a version snapshot
* **Timestamps** for each version
* **Change diffs** showing what was added or removed

<Note>
  Version history is available on **Pro** and **Max** plans. Free and Starter plans keep the last 7 days only.
</Note>

## Draft Recovery

Accidentally closed your browser mid-edit? No problem.

### How Draft Recovery Works

1. Every change saves to **IndexedDB** locally
2. If you close the browser, drafts persist
3. When you return, Cleve offers to **restore unsaved changes**
4. Accept the prompt to recover your work

This protects against:

* Browser crashes
* Accidental tab closures
* Computer shutdowns
* Network interruptions

## Advanced Features

### Content Blocks

Structure your writing with reusable content blocks:

* **Callout Boxes**: Highlight important information
* **Image Embeds**: Drag-and-drop images directly into the editor
* **Embedded Media**: YouTube videos, tweets, and more
* **Tables**: Create data tables with formatting

### Collaborative Editing

When multiple users edit the same writing:

* **Live cursors** show where collaborators are typing
* **Conflict resolution** prevents overwrites
* **User avatars** indicate who's currently editing

See [Collaboration](/features/collaboration) for more details.

### Export Options

Export your writings in multiple formats:

* **Markdown (.md)**: Plain text with Markdown syntax
* **HTML**: Formatted web-ready output
* **PDF**: Print-ready document
* **Plain Text (.txt)**: Stripped of all formatting

## Best Practices

### Organizing Your Writings

1. **Use categories** to group related content
2. **Add descriptive titles** with H1 headings
3. **Link related writings** to build connections
4. **Tag important concepts** for easier searching

### Writing Workflow Tips

1. **Start in zen mode** to focus without distractions
2. **Use ideas panel** to capture thoughts before writing
3. **Set writing timers** for accountability
4. **Reference AI chat** when you need inspiration
5. **Review version history** to track progress over time

### Performance Optimization

* **Long documents** (10,000+ words): Consider splitting into multiple writings
* **Images**: Optimize before uploading (Cleve auto-compresses to 1MB max)
* **Clear old drafts**: Periodically clean up IndexedDB for faster performance

## Troubleshooting

### Auto-Save Not Working

1. Check browser console for errors
2. Ensure IndexedDB is enabled in your browser
3. Verify you're not in incognito/private mode
4. Clear browser cache and reload

### Content Not Syncing

1. Check your internet connection
2. Look for the sync status indicator
3. Force a manual save with `Cmd/Ctrl + S`
4. Refresh the page to trigger sync

### Editor Lag or Slow Performance

1. Check document length (split very long docs)
2. Close unused browser tabs
3. Disable browser extensions that inject scripts
4. Update to the latest browser version

## Related Documentation

<CardGroup cols={2}>
  <Card title="AI Chat" icon="comments" href="/features/ai-chat">
    Use AI to help write, edit, and improve your content.
  </Card>

  <Card title="Document Linking" icon="link" href="/features/linking">
    Build a connected knowledge graph with bidirectional links.
  </Card>

  <Card title="Keyboard Shortcuts" icon="keyboard" href="/reference/keyboard-shortcuts">
    Complete reference of all writing shortcuts.
  </Card>

  <Card title="Offline Mode" icon="wifi-slash" href="/features/offline-mode">
    Learn how offline sync and draft recovery work.
  </Card>
</CardGroup>
