react-markdown-github

3.3.1 • Public • Published

react-markdown-github

A React component that wraps react-markdown that:

Installation

npm install react-markdown-github

Usage

<MarkdownGithub 
  source={ markdown } 
  sourceUri='https://github.mycorp.com/org/component/blob/master/README.md'  
  transformLinkUri={ ({ uri, github, org, repo, filename, filepath }) => { } }
  transformImageUri={ ({ uri, github, org, repo, filename }) => {} }
  renderers={ code: myCodeFormatter } 
  className='myClass' />

Component Properties

  • sourceUri Absolute URL to orgional markdown. All relative links will be resolved relative to this URL.
  • transformLinkUri URL resolver function. To override the URL resolver and point a url to an alternate location.
  • transformImageUri image URL resolver function. Default behavior is to not modify image urls.
  • renderers An object of render function values with keys corresponding to Node Type to be passed to react-markdown.
  • className the CSS class passed to react-markdown.

Test

npm test
LICENSE: MIT

/react-markdown-github/

    Package Sidebar

    Install

    npm i react-markdown-github

    Weekly Downloads

    22

    Version

    3.3.1

    License

    MIT

    Unpacked Size

    47.1 kB

    Total Files

    16

    Last publish

    Collaborators

    • indexzero
    • jcline
    • sivanmehta
    • swaagie