1.0.2 • Published 2 years ago

react-markdown-math v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-markdown-math

A react wrapper library for React Markdown so that you can render complex math equations in no time.

Contents

What is this?

This package is a React component that can be given a string of markdown with math (in Latex format) that it’ll safely render to React elements. You can pass plugins to change how markdown is transformed to React elements and pass components that will be used instead of normal HTML elements.

When should I use this?

You might need to render complex mathematical equations written in Markdown for your React application. This library uses React Markdown and Better React Mathjax under the hood. You can use this for a quick implementation.

Install

npm install react-markdown-math

Usage

<ReactMarkdownMath markdown='\\(\\frac{10}{4x} \\approx 2^{12}\\)' />

API

The default export is ReactMarkdownMath.

markdown

The markdown string

reactMarkdownProps

This optional prop is for additional configuration of React Markdown. Find the details here

Contribute

If you find any issues or scope for improvement, please feel free to raise a pull request. If you feel like you don't have the bandwidth to get your hands dirty, please do create a new issue while ensuring its not a duplicate.

License

MIT

Related