I'm trying to convert Markdown to HTML using react-markdown. My code is pretty straightforward:
import React from 'react';
import ReactMarkdown from 'react-markdown';
const markdown = `
# Header 1
## Header 2
_ italic _
** bold **
<b> bold Html </b>
`;
return (
<div className='sidebar-right'>
<div className='main-bar'>
<ReactMarkdown source={markdown} />
</div>
</div>
)
My problem is that the output in the browser is a code block, and not the HTML I expected. I realise that my markdown content is wrapped in backticks, which designates it as code in markdown, but that's what the plugin example says I should do. Any suggestions as to how I can get this to work would be greatly appreciated. Thanks and regards, Dan.