New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-md-renderer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-md-renderer

Simple batteries included rendering library for markdown files.

latest
Source
npmnpm
Version
1.0.4-0
Version published
Maintainers
1
Created
Source

react-md-renderer NPM

Simple batteries included rendering library for markdown files.

Features

  • :nail_care: Stylized Defaults - Beautiful presentation of your content powered by mui
  • :wrench: Easily Customizable - Exact same API as markdown-to-jsx
  • :art: Syntax Highlighting - Powered by react-syntax-highlighter
  • :book: Semantic - Meaningful html tags representing your content

Getting Started

import { ReactMdRenderer } from 'react-md-renderer/v5';

const MyComponent = () => {
  const options = {
    overrides: {
      img: {
        props: {
          style: {
            maxWidth: '100%',
            height: 'auto',
          },
          align: 'center',
        },
      },
    },
    wrapper: 'article',
    forceBlock: true,
  };

  return (
    <div>
      <ReactMdRenderer options={options}>
        {'# My Markdown Content'}
      </ReactMdRenderer>
    </div>
  );
};

Docs

This component is essentially a custom config of markdown-to-jsx. It shares the same API so check out the markdown-to-jsx docs for options.

With @material-ui/core

import { ReactMdRenderer } from 'react-md-renderer/v4';

With @mui/material

import { ReactMdRenderer } from 'react-md-renderer/v5';

Keywords

react

FAQs

Package last updated on 26 Feb 2023

Did you know?

Socket

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.

Install

Related posts