I have a Draft editor using markdown, which I implemented using markdown-draft-js.
I noticed that when passing a markdown with a code block inside to markdownToDraft, the output doesn't contain any of that code block.
I set up this codesandbox test case to illustrate this point.
Is there any option to let markdownToDraft parse the content of the code blocks?
Context
Sometimes the user indents their input (adding four spaces at the beginning of a line), which in markdown is syntax to create a code block.
When they do so and their input is stored, and then they want to edit and what they typed in is retrieved, when markdownToDraft is applied to it in order to present it through a Draft editor, markdownToDraft removes the "indented" lines.
I have a Draft editor using markdown, which I implemented using
markdown-draft-js
.I noticed that when passing a markdown with a code block inside to markdownToDraft, the output doesn't contain any of that code block.
I set up this codesandbox test case to illustrate this point.
Is there any option to let markdownToDraft parse the content of the code blocks?
Context
Sometimes the user indents their input (adding four spaces at the beginning of a line), which in markdown is syntax to create a code block.
When they do so and their input is stored, and then they want to edit and what they typed in is retrieved, when
markdownToDraft
is applied to it in order to present it through a Draft editor, markdownToDraft removes the "indented" lines.