0.0.5 • Published 5 years ago

react-markdown-editor-mini v0.0.5

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

一款基于react开发轻量级的markdown编辑器

安装

npm install react-markdown-editor-mini --dev

or 

yarn add react-markdown-editor-mini --dev

api配置

配置类型默认值说明是否必填
widthnumber678编辑器的宽度选填
heightnumber678编辑器的高度选填
defaultValuestring''初始化默认内容选填
isFullScreenbooleanfalse默认是否全屏选填
uploadImgUrlstring''上传图片接口url选填
onChangefunctionvoid内容变化触发回调函数选填

案例

import React from 'react'
import Editor from 'react-markdown-editor-mini'

class Example extends React.Component{
    onChange=(value,html)=>{
        // 获取markdown内容和对应生成的html内容
    }
    render(){
       return (
           <Editor width={788} height={400} isFullScreen={true} uploadImgUrl='http://xxxxxxxx/xxx' onChange={this.onChange}/>
       )
   }
}
0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago