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.
In here, you can find the following markdown elements:
- Headings
- Lists
- Unordered
- Ordered
- Check lists
- And nested ;)
- Links
- Bold/Italic/Underline formatting
- Tables
- Code block editors
- And much more.
The current editor content is styled using the @tailwindcss/typography plugin.
What can you do here?
This is a great location for you to test how editing markdown feels. If you have an existing markdown source, you can switch to source mode using the toggle group in the top right, paste it in there, and go back to rich text mode.
If you need a few ideas, here’s what you can try:
- Add your own code sample
- Change the type of the headings
- Insert a table, add a few rows and columns
- Switch back to source markdown to see what you’re going to get as an output
- Test the diff feature to see how the markdown has changed
- Add a frontmatter block through the toolbar button
A code sample
MDXEditor embeds CodeMirror for code editing.
export default function App() { return (<div>Hello world</div>)}A live code example
The block below is a live React component. You can configure multiple live code presets that specify the available npm packages and the default imports. You can also specify a default component that will be rendered in the live code block.
export default function App() { return ( <div> <p>This is a React JSX in action </p> </div> )}A table
Play with the table below - add rows, columns, change column alignment. When editing,
you can navigate the 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 |
is fully 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 (Mozilla Docs)
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 / Alerts
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 & Checklists
Let’s test emojis and checkboxes:
- 🎉 Emojis are enabled!
- 🚀 Fast loading times.
- Check icon maps updated
- Tested devicon integration
- Deploy production build
Advanced Code Highlighting (Expressive Code)
This code block showcases 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 & Summary
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.