Document Editor
Save, edit, and refine content with built-in AI actions.
The Editor is where generated content goes to become finished content. It's a minimal document manager with 7 one-click AI actions you can apply to any selection (or the whole document).
Layout
┌─────────────────┬────────────────────────────────────┐
│ Documents │ Editor │
│ │ │
│ + New │ Title: My Blog Post │
│ │ │
│ • My Blog Post │ [ Editor surface ] │
│ • Cold email │ │
│ • Landing hero │ │
│ │ Word count · Active provider │
│ │ AI actions toolbar │
└─────────────────┴────────────────────────────────────┘Left pane: the document list. Right pane: the current document.
Creating a document
Two ways:
- Click + New in the sidebar. An empty document opens with placeholder title "Untitled document".
- On the Generate page, click Save as Document after generating — the output becomes a new document with the template name as the title.
Editing
The editor is a plain textarea surface (v1). You can:
- Edit the title at the top (blurring saves automatically)
- Edit the content area freely
- Use the word / character counter at the bottom right to track length
Tiptap coming soon
ContentAI ships with Tiptap dependencies installed. A future update will
replace the textarea with a rich-text editor. You can opt in early by editing
app/(dashboard)/editor/page.tsx to render a Tiptap EditorContent.
AI actions
Seven buttons below the editor that transform the current document content:
| Action | What it does |
|---|---|
| ✨ Improve | Rewrites for clarity, flow, and polish |
| ✂️ Shorten | Makes the text concise without losing key ideas |
| ➕ Expand | Adds more detail, examples, and context |
| ✅ Fix Grammar | Corrects grammar, spelling, and punctuation |
| 💼 Professional | Rewrites in a professional, formal tone |
| 🧢 Casual | Rewrites in a casual, friendly tone |
| 📝 Summarize | Replaces the content with a short summary |
Each action:
- Sends the current content to
/api/generatewith a task-specific system prompt - Uses your active provider and model
- Replaces the content with the result (the previous version is kept in browser history via undo)
Actions replace content
AI actions replace the entire document content with the transformed version. If you want to keep the original, duplicate the document first (long-press or right-click in the list).
Saving and deleting
- Auto-save — content and title save to
localStorageon blur and after every keystroke (debounced 500ms). - Delete — hover a document in the list and click the trash icon. A confirmation dialog prevents accidents.
Export
Use the action bar above the editor to:
- Copy — puts the content on the clipboard
- Download as .md — exports the content as a Markdown file named after the title
Keyboard shortcuts
| Shortcut | Action |
|---|---|
⌘/Ctrl + S | Force save |
⌘/Ctrl + C | Copy (when text selected) |
⌘/Ctrl + Z | Undo |
⌘/Ctrl + Enter | Run the last AI action |
Customization
Common edits to app/(dashboard)/editor/page.tsx:
- Add a new AI action — add an entry to the
aiActionsarray with alabel,icon, andsystemPrompt. - Change the model used for actions — by default it uses
selectedModels[activeProvider]. You can hard-code a specific model (e.g. always use Claude for "Fix Grammar"). - Add tags or folders — extend the
Documentinterface inlib/store.tsand render tag chips in the list.
Next: History →