mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
f8e015ff62
* Improve SEO metadata: update descriptions to 130-155 chars across 177 pages Generated-By: mintlify-agent * Apply suggestion from @ethanpalm * Apply suggestions from code review Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> * 💅 --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
59 lines
3.0 KiB
Plaintext
59 lines
3.0 KiB
Plaintext
---
|
|
title: "Edit with AI"
|
|
description: "Use inline AI in the Mintlify web editor to write new content, rewrite existing text, restructure sections, and improve documentation quality."
|
|
keywords: ["ai", "inline", "editing", "improve writing", "auto structure", "ask ai"]
|
|
---
|
|
|
|
<Note>
|
|
Inline AI editing is available in visual mode only. Switch to visual mode using the toggle in the editor toolbar.
|
|
</Note>
|
|
|
|
Use inline AI editing to generate new content, improve existing content, or restructure sections without leaving the visual editor. AI changes appear as a highlighted diff so you can review them before making any changes.
|
|
|
|
## Start an AI editing session
|
|
|
|
There are four ways to start an AI editing session:
|
|
|
|
- **<kbd>Space</kbd> on an empty line**: Press <kbd>Space</kbd> on an empty paragraph to open the AI prompt.
|
|
- **Slash command**: Type <kbd>/</kbd> and select **Ask AI** from the menu.
|
|
- **Text toolbar**: Select text, then click the <Icon icon="sparkles" /> sparkle icon in the floating toolbar to choose an AI action.
|
|
- **Block menu**: Click the drag handle next to any block and select **Ask AI**.
|
|
|
|
## Skills
|
|
|
|
### Ask AI
|
|
|
|
Type an instruction for the AI to follow. Use this for any edit that doesn't fit a preset action, such as translating text, adding examples, or rewriting for a different audience.
|
|
|
|
When you use the Ask AI skill on an empty paragraph, AI generates new content. When you use the Ask AI skill on existing content, AI edits the selected content based on your prompt.
|
|
|
|
### Improve writing
|
|
|
|
Select text and choose **Improve writing** from the text toolbar for the AI to refine grammar, clarity, and tone while preserving your meaning.
|
|
|
|
### Optimize structure
|
|
|
|
Select text and choose **Optimize structure** from the text toolbar for the AI to reorganize the selected content into a clearer structure using appropriate headings, lists, or other formatting.
|
|
|
|
## Review and apply changes
|
|
|
|
After you submit a prompt, AI streams its response directly into the editor. The editor highlights any insertions and deletions with diff marks so you can review the changes.
|
|
|
|
When the AI finishes, the floating prompt bar shows a summary of the changes along with action buttons:
|
|
|
|
- **Apply** <Icon icon="check" />: Accept the changes and save them to the document. You can also press <kbd>Enter</kbd> to apply.
|
|
- **Undo** <Icon icon="undo-2" />: Revert the changes and restore the original content.
|
|
- **Retry** <Icon icon="refresh-cw" />: Discard the current result and run the same prompt again.
|
|
|
|
Press <kbd>Esc</kbd> at any time to discard the AI session and restore the original content.
|
|
|
|
## Edit your prompt
|
|
|
|
The prompt input stays visible while the AI generates its response. Refine your instruction and resubmit if the result doesn't match what you expected:
|
|
|
|
1. Click **Undo** <Icon icon="undo-2" /> to revert the current changes.
|
|
2. Edit the prompt text in the input field.
|
|
3. Press <kbd>Enter</kbd> or click the submit button to run the updated instruction.
|
|
|
|
If the AI returns an error, click **Retry** <Icon icon="refresh-cw" /> to try again or edit the prompt and resubmit.
|