Skip to content

web editor page suggestion #640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: docs-retreat
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"groups": [
{
"group": "Get Started",
"pages": ["introduction", "quickstart", "development", "dedicated-migration"]

"pages": ["introduction", "web-editor", "quickstart", "development", "dedicated-migration"]
},
{
"group": "Essentials",
Expand Down
110 changes: 110 additions & 0 deletions web-editor.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
title: Web Editor
description: "Edit your docs directly from the dashboard with live previews."
---
> Navigation is currently controlled by the docs.json in your IDE. We are building out a file-tree system to enable users to control navigation in the Web Editor.

Web Editor lets you edit documentation without opening your IDE or running `mintlify dev`. It features a live preview, git workflow integration, and support for custom components.

## Quick Start

1. [Create or switch branches](#creating-new-branches) to avoid publishing directly to main
2. Make your edits using the [Visual Editor](#visual-editor) or [Source Editor](#source-editor)
3. [Commit your changes](#making-a-commit) or [create a pull request](#making-a-pull-request)

## Git Workflow Integration

<Note>
Please install the Mintlify GitHub app to your account before using these features. Install from the [GitHub App page](https://dashboard.mintlify.com/settings/organization/github-app) in your dashboard.
</Note>

### Creating new branches

To avoid publishing directly to your main docs site, switch to a different branch:

1. Open the branches modal on the top left of the editor
2. Either select an existing branch or create a new one by clicking "New Branch"

<Frame>
<img src="https://mintlify.s3.us-west-1.amazonaws.com/mintlify/images/editor/branches-dark.png" />
</Frame>

<Tip>
Creating a new branch is recommended for changes that require review. You'll default back to the main branch when you reload the page.
</Tip>

### Making a commit

To save your changes:

- **On main branch**: Click the "Publish" button to push directly to the repository
- **On other branches**: Click the "Save Changes" button to commit to your branch

### Making a pull request

When ready for review:

1. Click the "Publish Pull Request" button
2. Edit the title and description or use the default provided
3. Submit to create the PR on GitHub

<Frame>
<img src="https://mintlify.s3.us-west-1.amazonaws.com/mintlify/images/editor/pr-modal-dark.png" />
</Frame>

## Editor Modes

<Frame caption="View mode toggle">
<img src="https://mintlify.s3.us-west-1.amazonaws.com/mintlify/images/editor/mode-toggle-dark.png" />
</Frame>

### Visual Editor

A WYSIWYG editor (like Notion) that shows a preview of your final docs while allowing direct editing. Access content blocks using slash commands (type `/`).

#### Available Content Blocks

**Standard markdown:**
- Paragraph, Headings
- Bullet and Numbered Lists
- Tables, Images, Blockquotes

**Mintlify components:**
- Callouts, Accordions, Accordion Groups
- Cards, Card Groups
- Code Blocks, Code Groups
- Tabs, Steps, Frames, Updates

### Source Editor

Edit your MDX files directly in code, similar to an IDE. This mode allows you to:
- Edit component props (not yet available in Visual Editor)
- Fix syntax errors incompatible with Visual Editor

### Diff View

Compare your changes before committing them to your repository.

## Working with Images

### Adding images

1. Type `/image` in Visual Editor
2. Choose to upload a new image or select an existing one
3. Complete the form with alt text and other properties

### Editing images

1. Hover over an image to reveal Edit and Delete buttons
2. Click Edit to modify attributes
3. To replace with a new image, delete the current one and add a new one

## Current Limitations

- **Navigation tree**: Not live-updated based on added/edited files
- **Snippet previews**: Custom snippets don't show previews yet
- **OpenAPI previews**: OpenAPI specs don't show previews yet

## Feedback

For bug reports, feature requests, or general feedback, email us at [[email protected]](mailto:[email protected])