Source Editor
Source Editor

Edit raw MDX directly for precise control.

The source editor shows the raw MDX behind a page. It is the right tool when you need exact control over structure, want to paste prepared content, or are editing components by hand.

When to use source

Use source forWhy
Precise MDX structureDirect control over nesting and props
Bulk or pasted contentFaster than re-formatting visually
Tricky componentsSet props exactly as intended
Reviewing diffsSee the literal text that changed

Working in source

Open source view

Switch from visual editing to source.

Edit MDX directly

Write Markdown and components as text.

Mind the frontmatter

Keep the --- frontmatter block first and valid YAML.

Switch back to verify

Return to the visual or view mode to confirm it renders.

Frontmatter must stay valid

Quote values containing colons and keep the block at the top. Invalid YAML frontmatter prevents the page from rendering.

Exact syntax

For component props and Markdown rules, use the Reference. Unsupported constructs (like indented code blocks or ~~~ fences) are documented there.

Use source for the parts that need precision and the visual editor for everything else. They edit the same page.

Last updated on