react-md-translator
使用markdown文件编写你的react组件示例
Last updated 5 years ago by qingze .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install react-md-translator 
SYNC missed versions from official npm registry.

react-md-translator

使用markdown文件编写你的react组件示例

解析规则

组件可将以:::demo为开头,:::为结尾的markdown内容解析为特定的代码块,其中代码部分需要使用 ````js`进行包裹,详情见demo文件夹。

开始使用

 npm i react-md-translator

使用示例

import React from 'react'
import DemoPage from 'react-md-translator'
import 'react-md-translator/style/index.scss';
import 'react-md-translator/style/md-style.scss';

class demo extends React.Component {
  render() {
    return (
        <DemoPage markdown={require('./test.md')}/>
    )
  }
}

请使用webpack raw-loader加载markdown文件

demo

demo示例

API

API 类型 描述
dependencies Object demo所需要的依赖项
renderer Object marked.renderer配置
locale Object {showText:'显示代码',hideText:'隐藏代码'}
children Markdown markdown文件

Current Tags

  • 1.0.9                                ...           latest (5 years ago)

29 Versions

  • 1.0.9                                ...           5 years ago
  • 1.0.8                                ...           5 years ago
  • 1.0.7                                ...           5 years ago
  • 1.0.6                                ...           5 years ago
  • 1.0.5                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.20                                ...           6 years ago
  • 0.0.19                                ...           6 years ago
  • 0.0.18                                ...           6 years ago
  • 0.0.17                                ...           6 years ago
  • 0.0.16                                ...           6 years ago
  • 0.0.15                                ...           6 years ago
  • 0.0.13                                ...           6 years ago
  • 0.0.12                                ...           6 years ago
  • 0.0.11                                ...           6 years ago
  • 0.0.10                                ...           6 years ago
  • 0.0.9                                ...           6 years ago
  • 0.0.8                                ...           6 years ago
  • 0.0.7                                ...           6 years ago
  • 0.0.6                                ...           6 years ago
  • 0.0.5                                ...           6 years ago
  • 0.0.4                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE