Skip to content

MDX equivalent for <div markdown="1"> to render Markdown within HTML tags #2185

Answered by ChristianMurphy
dandv asked this question in Q&A
Discussion options

You must be logged in to vote

For MDX 1 a newline is needed.

<div>

*Emphasized* text.

</div>

For MDX 2, which is now recommended, and Docusaurus is moving to (facebook/docusaurus#4029)
No newline is needed, there is a full walkthrough of MDX 2 syntax on the website. https://mdxjs.com/docs/what-is-mdx/#mdx-syntax

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@ChristianMurphy
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ChristianMurphy
Comment options

You must be logged in to vote
2 replies
@ChristianMurphy
Comment options

@sebawita
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants