MDX equivalent for <div markdown="1"> to render Markdown within HTML tags
#2185
-
|
Some Markdown parsers allow parsing markdown within HTML tags by adding a What is the MDX equivalent for rendering markdown into JSX tags? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
|
This SO answer suggested leaving an empty line after the opening HTML (JSX) tag: I tested that with Docusaurus, which uses MDX, and the text was emphasized as expected. Without the line after the |
Beta Was this translation helpful? Give feedback.
-
|
For MDX 1 a newline is needed. For MDX 2, which is now recommended, and Docusaurus is moving to (facebook/docusaurus#4029) |
Beta Was this translation helpful? Give feedback.
-
|
ooooh I am very excited about the migration to Does this mean that we will be able to use |
Beta Was this translation helpful? Give feedback.
For MDX 1 a newline is needed.
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