You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to get the RAW html that is output so I can maybe copy it and use it elsewhere. Say for instance a Markdown editor, where a user can write markdown, and it is output to the page by react-markdown. Is it possible to get the HTML instead of going to inspect element?
The text was updated successfully, but these errors were encountered:
Short answer:
Is possible to get HTML from unified/micromark? yes (these are the underlying libraries for react-markdown and are maintained by the same team)
Will react-markdown specifically support it? probably not the library is designed specifically to generate React components.
Context:
Micromark is the underlying markdown parser used in react-markdown, it can be used directly to take markdown to HTML. Remark and Rehype builds on Micromark, allowing content to be transformed with Plugins along the way. react-markdown builds on remark (and soon rehype) to output React components specifically.
Generating HTML is a non-goal for react-markdown specifically, because it, as the name implies, targets React.
However other libraries (micromark, remark, and rehype) in the same organization, with the same maintainers, are designed to do what you are looking for and go from markdown to HTML.
I'm not sure if this has been posted.
I want to be able to get the RAW html that is output so I can maybe copy it and use it elsewhere. Say for instance a Markdown editor, where a user can write markdown, and it is output to the page by react-markdown. Is it possible to get the HTML instead of going to inspect element?
The text was updated successfully, but these errors were encountered: