Welcome
This is a live demo of MDXEditor with all default features on.
The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions.
Supported markdown elements:
- Headings
- Lists
- Unordered
- Ordered
- Check lists
- Nested
- Links
- Bold, italic, and underline formatting
- Tables
- Code block editors
- Math and diagrams
The editor content is styled using the @tailwindcss/typography plugin.
Test editor features
Use this space to test markdown rendering and editing behavior. Switch to source mode using the toggle in the top right, paste markdown content, and toggle back to rich text mode.
Things you can try:
- Add your own code sample
- Change heading levels
- Insert a table and add rows or columns
- Switch to raw markdown source to inspect output
- Test the diff feature to see changes
- Add frontmatter properties
Code sample
MDXEditor embeds CodeMirror for code editing:
export default function App() { return (<div>Hello world</div>)}Live component example
The block below is a live React component. You can configure multiple live code presets that specify available npm packages and default imports:
export default function App() { return ( <div> <p>This is a React JSX in action</p> </div> )}Tables and math
Play with the table below: add rows, columns, and change column alignment. Navigate cells with Enter, Shift+Enter, Tab, and Shift+Tab.
| Item | In Stock | Price |
|---|---|---|
| Python Hat | True | 23.99 |
| SQL Hat | True | 23.99 |
| Codecademy Tee | False | 19.99 |
| Codecademy Hoodie | False | 42.99 |
LaTeX is supported with KaTeX:
To solve the cubic equation (where the real numbers satisfy ) one can use Cardano’s formula:
For any and , the Cauchy-Bunyakovsky-Schwarz inequality can be written as follows:
Finally, the determinant of a Vandermonde matrix can be calculated using the following expression:
Three famous mathematical formulas on MDN
Mermaid diagrams
Here is a test of Mermaid diagram support:
graph TD
A[Start Development] --> B(Write Code)
B --> C{Verify with typecheck?}
C -->|Yes| D[Run Astro Build]
C -->|No| E[Fix Errors]
E --> B
D --> F[Deploy to Hosting]
GitHub-style callouts
Here are tests for GitHub-style blockquote alerts:
[!NOTE] This is a useful note detailing background context or general information.
[!TIP] This is a helpful tip or optimization suggestion for improved performance.
[!IMPORTANT] This represents essential requirements or key steps critical for completion.
[!WARNING] This warning alerts you to potential breaking changes or security issues.
[!CAUTION] This caution represents high-risk actions that could cause data loss or bugs.
Emojis and task lists
Test emojis and checkboxes:
- 🎉 Emojis are enabled.
- 🚀 Fast loading times.
- Check icon maps updated
- Tested devicon integration
- Deploy production build
Syntax highlighting with Expressive Code
This code block demonstrates line highlighting, focus states, and collapsible sections:
// Highlight lines 1 and 5-7import { getTechIconClass } from '@/lib/tech-icons';
export function demonstrateIcons() { const reactIcon = getTechIconClass('react'); const tailwindIcon = getTechIconClass('tailwind'); const gcpIcon = getTechIconClass('gcp');
4 collapsed lines
// This section is collapsed by default console.log('React icon class:', reactIcon); console.log('Tailwind icon class:', tailwindIcon); console.log('GCP icon class:', gcpIcon);
return { reactIcon, tailwindIcon, gcpIcon };}HTML details element
Click to expand and reveal hidden content
This is inside the details element. Markdown elements like bold text and code inline should be styled correctly here.