Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block codes in markdown are removed #148

Open
CarlosVazPI opened this issue Jan 6, 2021 · 1 comment
Open

Block codes in markdown are removed #148

CarlosVazPI opened this issue Jan 6, 2021 · 1 comment

Comments

@CarlosVazPI
Copy link

CarlosVazPI commented Jan 6, 2021

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.

@mdugue
Copy link

mdugue commented Nov 16, 2021

same here. @CarlosVazPI any news? Did you find a way to solve or work around?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants