markdown-to-jsx v6 is now available

The ability to override the rendered representation of anything.

import Markdown from 'markdown-to-jsx';
import React from 'react';
import {render} from 'react-dom';

// surprise, it's a div instead!
const MyH1 = ({children, ...props}) => (<div {...props}>{children}</div>);

render((
<Markdown
options={{
overrides: {
h1: {
component: MyH1,
props: {
className: 'foo',
},
},
},
}}>
# Hello world!
</Markdown>
), document.body);

/*
renders:

<div class="foo">
Hello World
</div>
*/

HTML is a-ok.

Github-Flavored Markdown (GFM) syntaxes are supported.

Poetry, tech, other pursuits. 🏳️‍🌈

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Evan Jacobs

Evan Jacobs

Poetry, tech, other pursuits. 🏳️‍🌈

More from Medium

Tauri 0 to 100

My First Experience with Anime.js

//Here for each span we will define translate property with 1 second duration btn .add({ targets: ‘span:nth-child(1)’, translateX: ‘110%’, width: ‘100%’, duration: 1000, }) .add({ targets: ‘span:nth-child(2)’, translateY: ‘110%’, height: ‘100%’, duration: 1000 }) .add({ targets: ‘span:nth-child(3)’, translateX: ‘-110%’, width: ‘100%’, duration: 1000 }) .add({ targets:’span:nth-child(4)’, translateY: ‘110%’, height: ‘-110%’, d

Uploading files in react with filestack

Filestack

1-min how to: vite init