I need to pass down an id and class to a component.
However the id is not showing in the output.
<ReactMarkdown
id="preview"
className="markdown-output"
source={display}
skipHtml={false}
escapeHtml={false}
renderers={{ code: CodeBlock , link: LinkRenderer }}
/>
);
}
Only results to :
<div class="markdown-output">
Can you please guide me so that the output includes the id ="preview".
Thank you very much.
@niccololampa if you are interested in adding an id/class, consider using a custom renderer https://github.com/rexxars/react-markdown#options and/or using a remark plugin https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins
This issue is not enough to go on, but Christian鈥檚 answer should indeed work.