1.0.15 • Published 9 years ago

babel-plugin-markdown-react v1.0.15

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

babel-plugin-markdown-react

This plugin will use remarkable to pre-process all markdown within a Markdown component. Then we parse that HTML with babel into an AST and just replace the Markdown children node with the parsed AST.

Example

npm install babel babel-core babel-plugin-markdown-react --save

Follow the guidelines here https://babeljs.io/docs/advanced/plugins/ to work the plugin into your asset pipeline.

import React from "react";
import Markdown from "babel-plugin-markdown-react/markdown";


export default class RenderMarkdown extends React.Component {

    render() {
        return (
            <Markdown>
                ## Something

                ## Something else as important

                ```
                var a = 1;
                var b = 2;
                var c = a + b;

                console.log(c) //3 => Math
                ```
            </Markdown>
        )
    }
}
1.0.15

9 years ago

1.0.14

9 years ago

1.0.13

9 years ago

1.0.12

9 years ago

1.0.11

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago