Files
Ethan Palm 6f0cf51504 Document support for .md (#1900)
* replace `MDX` with `Markdown` where appropriate

* favor MDX

* Emphasize .md is for migration, .mdx is recommended

* favor MDX

* missing words
2025-11-25 19:15:15 -08:00

421 lines
16 KiB
Plaintext

---
title: "Visual editor"
description: "Create, maintain, and publish documentation in your browser."
keywords: ["visual editor", "WYSIWYG", "web editor"]
---
<img
className="block dark:hidden my-0 pointer-events-none"
src="/images/editor/editor-light.png"
alt="Mintlify visual editor interface in light mode"
/>
<img
className="hidden dark:block my-0 pointer-events-none"
src="/images/editor/editor-dark.png"
alt="Mintlify visual editor interface in dark mode"
/>
Access the visual editor from your [dashboard](https://dashboard.mintlify.com/editor) to manage your documentation directly in your browser.
- **WYSIWYG editing**: Make changes to your documentation using a what-you-see-is-what-you-get (WYSIWYG) editor that shows how your content will look when published.
- **Git synchronization**: All changes automatically sync with your Git repository to maintain version control.
- **Team collaboration**: Multiple people can work on documentation simultaneously.
- **Component integration**: Add callouts, code blocks, and other components with slash commands.
- **No setup required**: Start writing immediately from your dashboard.
## Overview
Here is how you'll typically work in the visual editor:
<Steps>
<Step title="Choose your branch">
Create a branch or make changes directly to your deployment branch. We recommend creating a branch so that you can preview your changes before they go live.
</Step>
<Step title="Open your file">
Navigate to an existing file in the sidebar or create a new one using the file explorer.
</Step>
<Step title="Edit your content">
Make changes in the visual editor. Press <kbd>/</kbd>
to open the component menu.
</Step>
<Step title="Preview your changes">
Visual mode shows you how your changes will appear on your live site. Use this to verify everything looks correct.
</Step>
<Step title="Publish your changes">
If you're working on your deployment branch, publish your changes directly from the visual editor. On other branches, you'll create a pull request for review before publishing.
</Step>
</Steps>
## Editor modes
The visual editor has two modes to accommodate different editing preferences and needs: visual mode and Markdown mode.
Use the mode toggle in the editor toolbar to switch modes.
<Frame>
<img
src="/images/editor/mode-toggle-light.png"
alt="Mode toggle icons highlighted in the visual editor."
className="block dark:hidden"
/>
<img
src="/images/editor/mode-toggle-dark.png"
alt="Mode toggle icons highlighted in the visual editor."
className="hidden dark:block"
/>
</Frame>
### Visual mode
Visual mode provides a WYSIWYG experience where changes that you make in the editor reflect how your published documentation will look. This mode is ideal for when you want to see how your changes will look in real-time.
<Frame>
<img
src="/images/editor/visual-mode-light.png"
alt="Visual editing mode in the Mintlify visual editor"
className="block dark:hidden"
/>
<img
src="/images/editor/visual-mode-dark.png"
alt="Visual editing mode in the Mintlify visual editor"
className="hidden dark:block"
/>
</Frame>
### Markdown mode
Markdown mode provides direct access to the files that make up your documentation. This mode is ideal for when you need precise control over component properties or when you prefer to write in MDX syntax.
<Frame>
<img
src="/images/editor/markdown-mode-light.png"
alt="Markdown mode in the Mintlify visual editor"
className="block dark:hidden"
/>
<img
src="/images/editor/markdown-mode-dark.png"
alt="Markdown mode in the Mintlify visual editor"
className="hidden dark:block"
/>
</Frame>
## Manage content
### Navigate your files
Use the sidebar file explorer to browse your documentation files. Click on any file to open it in the editor.
Press <kbd>Command</kbd> + <kbd>P</kbd> on macOS or <kbd>Ctrl</kbd> + <kbd>P</kbd> on Windows to search for files by name.
### Create new pages
Select the **Create a new file** icon in the file explorer sidebar.
<Frame>
<img
src="/images/editor/files-menu-light.png"
className="block dark:hidden rounded-2xl border border-gray-100 shadow-lg"
style={{ width:"400px",height:"auto" }}
alt="Files menu in the visual editor"
/>
<img
src="/images/editor/files-menu-dark.png"
className="hidden dark:block rounded-2xl border border-white/10 shadow-lg"
style={{ width:"400px",height:"auto" }}
alt="Files menu in the visual editor in dark mode"
/>
</Frame>
Filenames are automatically appended with a `.mdx` extension. To change the file type, click the file extension. Select the file type you want from the dropdown menu.
<Frame>
<img
src="/images/editor/file-type-light.png"
className="block dark:hidden"
style={{ width:"auto",height:"400px" }}
alt="File extension menu in the visual editor."
/>
<img
src="/images/editor/file-type-dark.png"
className="hidden dark:block"
style={{ width:"auto",height:"400px" }}
alt="File extension menu in the visual editor in dark mode."
/>
</Frame>
### Rename pages
To rename a page, click the kebab menu icon for the file you want to rename. Select **Rename** from the dropdown menu.
<Frame>
<img
src="/images/editor/rename-light.png"
className="block dark:hidden"
alt="Rename page in the visual editor."
/>
<img
src="/images/editor/rename-dark.png"
className="hidden dark:block"
alt="Rename page in the visual editor in dark mode."
/>
</Frame>
### Delete pages
To delete a page, click the kebab menu icon for the file you want to delete. Select **Delete** from the dropdown menu.
<Frame>
<img
src="/images/editor/delete-page-light.png"
className="block dark:hidden"
alt="Delete page in the visual editor."
/>
<img
src="/images/editor/delete-page-dark.png"
className="hidden dark:block"
alt="Delete page in the visual editor in dark mode."
/>
</Frame>
### Organize your navigation
Edit your `docs.json` file to add new pages and remove deleted pages from your site navigation. See [Navigation](/organize/navigation) for more information on how to organize pages.
**Example: Add a Themes page to the Profile group**
In this example, you created a new page titled Themes and you want to add it to the Profile group in your documentation. Add the path to the new page to the `pages` array of the `Profile` group in your `docs.json` file for it to appear in your site navigation.
```json Adding a Themes page to the Profile group {18}
{
"navigation": {
"groups": [
{
"group": "Getting started",
"pages": [
"index",
"quickstart",
"installation"
]
},
{
"group": "Profile",
"pages": [
"settings",
"account-types",
"dashboard",
"themes"
]
}
]
}
}
```
### Edit content
Make changes to your pages using visual mode or Markdown mode in the editor.
In visual mode, press <kbd>/</kbd> to open the component menu. Add content blocks, callouts, code blocks, and other components to customize your documentation.
<Frame>
<img
src="/images/editor/component-menu-light.png"
alt="The unfurled component menu emphasized in the Mintlify visual editor"
className="block dark:hidden"
/>
<img
src="/images/editor/component-menu-dark.png"
alt="The unfurled component menu emphasized in the Mintlify visual editor"
className="hidden dark:block"
/>
</Frame>
In Markdown mode, you can directly edit the MDX of your pages. This can be helpful when you need to:
- Set specific component properties
- Work with complex nested components
- Copy and paste MDX content from other sources
See [Format text](/create/text) and [Format code](/create/code) for more information on how to write using MDX syntax.
## Publish your changes
The branch that you work on determines how the editor publishes your changes:
- **Deployment branch**: Publishing updates your live site immediately.
- **Other branches**: Publishing creates a pull request so you can review changes before deploying them to production.
<Frame>
<img
src="/images/editor/publish-flow-light.png"
alt="The publish button emphasized in the Mintlify visual editor"
className="block dark:hidden"
/>
<img
src="/images/editor/publish-flow-dark.png"
alt="The publish button emphasized in the Mintlify visual editor"
className="hidden dark:block"
/>
</Frame>
If you authorize Mintlify to your GitHub user, your commits will be signed as if you had made them yourself. If not, they will be signed by the Mintlify GitHub app.
### Pull requests and reviewing changes
Pull requests let you propose changes from your branch so that other people can review them before merging into your live documentation. This helps ensure that your changes are correct and gives your team a chance to collaborate on content.
<Tip>
Even if you're working solo, pull requests are valuable for previewing changes and maintaining a clear history of updates.
</Tip>
#### Create a pull request
<Steps>
<Step title="Save your work">
Select **Save Changes** to save all changes on your branch.
</Step>
<Step title="Create the pull request">
Select **Publish Pull Request** from the editor toolbar.
</Step>
<Step title="Add a title and description">
Write a clear title and description explaining:
- What changes you made
- Why you made them
- Any specific areas that need review
</Step>
<Step title="Create and share">
Select **Publish Pull Request**. The editor will provide a link to view your pull request.
<Frame>
<img
src="/images/editor/pull-request-light.png"
alt="Publish pull request button emphasized in the Mintlify visual editor"
className="block dark:hidden"
/>
<img
src="/images/editor/pull-request-dark.png"
alt="Publish pull request button emphasized in the Mintlify visual editor"
className="hidden dark:block"
/>
</Frame>
</Step>
</Steps>
#### Review pull requests
Once your pull request is created:
1. **Review changes**: You and your team members can review your pull request in your Git provider like GitHub or GitLab.
2. **Leave feedback**: Add comments or request changes.
3. **Make additional changes**: Make additional changes in the visual editor. When you save changes, the editor pushes them to your pull request.
4. **Approve**: Approve the pull request when you're satisfied with the changes.
5. **Merge**: Merge the pull request when you're ready to deploy your changes to production.
## Keyboard shortcuts
The visual editor supports all common keyboard shortcuts such as copy, paste, undo, and select all, and the following shortcuts:
| Command | macOS | Windows |
| :------------------------------- | :--------------------------------------------------- | :------------------------------------------------------- |
| **Search files** | <kbd>Cmd</kbd> + <kbd>P</kbd> | <kbd>Control</kbd> + <kbd>P</kbd> |
| **Add link to highlighted text** | <kbd>Cmd</kbd> + <kbd>K</kbd> | <kbd>Control</kbd> + <kbd>K</kbd> |
| **Add line break** | <kbd>Cmd</kbd> + <kbd>Enter</kbd> | <kbd>Control</kbd> + <kbd>Enter</kbd> |
| **Bold** | <kbd>Cmd</kbd> + <kbd>B</kbd> | <kbd>Control</kbd> + <kbd>B</kbd> |
| **Italic** | <kbd>Cmd</kbd> + <kbd>I</kbd> | <kbd>Control</kbd> + <kbd>I</kbd> |
| **Underline** | <kbd>Cmd</kbd> + <kbd>U</kbd> | <kbd>Control</kbd> + <kbd>U</kbd> |
| **Strikethrough** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd> |
| **Code** | <kbd>Cmd</kbd> + <kbd>E</kbd> | <kbd>Control</kbd> + <kbd>E</kbd> |
| **Normal text** | <kbd>Cmd</kbd> + <kbd>Alt</kbd> + <kbd>0</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>0</kbd> |
| **Heading 1** | <kbd>Cmd</kbd> + <kbd>Alt</kbd> + <kbd>1</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>1</kbd> |
| **Heading 2** | <kbd>Cmd</kbd> + <kbd>Alt</kbd> + <kbd>2</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>2</kbd> |
| **Heading 3** | <kbd>Cmd</kbd> + <kbd>Alt</kbd> + <kbd>3</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>3</kbd> |
| **Heading 4** | <kbd>Cmd</kbd> + <kbd>Alt</kbd> + <kbd>4</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>4</kbd> |
| **Ordered list** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> |
| **Unordered list** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>8</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>8</kbd> |
| **Blockquote** | <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> |
| **Subscript** | <kbd>Cmd</kbd> + <kbd>,</kbd> | <kbd>Control</kbd> + <kbd>,</kbd> |
| **Superscript** | <kbd>Cmd</kbd> + <kbd>.</kbd> | <kbd>Control</kbd> + <kbd>.</kbd> |
## Troubleshooting
Find solutions to common issues you might encounter while using the visual editor.
<AccordionGroup>
<Accordion title="Changes not appearing after publishing">
**Possible causes:**
- Deployment is still in progress
- Browser caching issues
- Build or deployment errors
**Solutions:**
1. Check deployment status in your dashboard.
2. Hard refresh your browser (<kbd>Ctrl</kbd>
+ <kbd>F5</kbd>
or <kbd>Cmd</kbd>
+ <kbd>Shift</kbd>
+ <kbd>R</kbd>
)
3. Clear your browser cache.
</Accordion>
<Accordion title="Permission errors when publishing">
**Possible causes:**
- Insufficient permissions to the Git repository
- Authentication issues with your Git provider
**Solutions:**
1. Verify you have correct access to the repository.
2. Check if your Git integration is properly configured.
3. Review the [Editor Permissions](/dashboard/permissions) documentation.
</Accordion>
<Accordion title="Editor loading issues">
**Possible causes:**
- Network connectivity problems
- Large documentation repositories
**Solutions:**
1. Check your internet connection.
2. Refresh the page.
3. Contact support if the issue persists.
</Accordion>
<Accordion title="Files not loading or showing errors">
**Possible causes:**
- Invalid MDX syntax in files
- Missing or corrupted files
- Large file sizes causing timeouts
**Solutions:**
1. Check the file syntax for MDX formatting errors
2. Verify the file exists in your repository.
</Accordion>
</AccordionGroup>
## Next steps
- Learn fundamental [Git concepts](/guides/git-concepts)
- Learn best practices for collaborating with [branches](/guides/branches)