Skip to content

How can I render as raw text for not allowed elements in react markdown? #1235

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

You must be logged in to vote

Cross referencing remarkjs/react-markdown#408 which has some previous discussion.
To recap:

  1. If you want to make the rendered content look more like the source markdown, consider using components https://github.com/remarkjs/react-markdown#appendix-b-components instead of allowedElements to custom render the output.
  2. If you want to skip parsing some parts of markdown
    • It is generally not advisable to do this. This essentially creates a new Markdown flavor, it can and likely will confuse content authors, for more info on the trade offs and alternatives see: https://github.com/micromark/micromark#extending-markdown
    • If you do choose to make you own Markdown flavor anyway, there is documentatio…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sungwoo91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants