
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
markdown-it-react-renderer
Advanced tools
Markdown to React Component converter.
This project uses Markdown parser from Markdown It library, but loosely supports its plugins.
import MDReactComponent from 'markdown-react-js';
...
render() {
return (
<MDReactComponent text='Some text **with emphasis**.' />
);
}
or, using function instead of component:
import { mdReact } from 'markdown-react-js';
...
render() {
return mdReact()('Some text **with emphasis**.');
}
Result:
<span>
<p>
Some text with <strong>emphasis</strong>.
</p>
</span>
const TAGS = {
html: 'span', // root node, replaced by default
strong: 'b',
em: 'i'
}
...
render() {
return (
<MDReactComponent text='Some **bold** and *italic* text.' tags={TAGS} />
);
}
Result:
<span>
<p>
Some <b>bold</b> and <i>italic</i> text.
</p>
</span>
function handleIterate(Tag, props, children, level) {
if (level === 1) {
props = {
...props,
className: 'first-level-class'
};
}
if (Tag === 'a') {
props = {
...props,
className: 'link-class',
href: props.href.replace('SOME_URL', 'http://example.com')
};
}
return <Tag {...props}>{children}</Tag>;
}
...
render() {
return (
<MDReactComponent text='[This link](SOME_URL) has it’s own style.' onIterate={handleIterate} />
);
}
Result:
<span>
<p class="first-level-class">
<a href="http://example.com" class="link-class">This link</a> has it’s own style.
</p>
</span>
Forked from
markdown-react-js Copyright 2015 Alexander Kuznetsov alexkuz@gmail.com
Markdown-it Copyright (c) 2014 Vitaly Puzrin vitaly@rcdesign.ru, Alex Kocharin alex@kocharin.ru
MIT
FAQs
React renderer for Markdown-it
We found that markdown-it-react-renderer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.