0.0.6 • Published 5 years ago

gry-antd-braft-editor v0.0.6

Weekly downloads
2
License
ISC
Repository
-
Last release
5 years ago

Read beforce use

Version

reactreact-domantd
16.7.016.7.03.24.3

在 create-react-app 脚手架新版本里(react: 16.13.1 , react-dom: 16.13.1)hooks版本里,会有警告信息, 在入口文件使用了

    <React.StrictMode>
        你的组件
    </React.StrictMode>

具体请移步点击

Introduce

Thrid parties used:braft-editor 和 braft-utils click to View
Antd the upload of the used antd component library

install

    # install using npm
    npm i gry-antd-braft-editor --save
    # install using yarn
    yarn add gry-antd-braft-editor --save

Use

    import React , {Component} from 'react'
    import BraftEditorGry from 'gry-antd-graft-editor'
    export default class GryEditorDemo Component{

        getBraftEditorHtml = (html)=>{
            console.log(html)
        }

        render(){
            return(
                <BraftEditorGry
                    imgVisitUrl="" # 图片访问路径
                    uploadAntd={{  # antd upload组件方法
                        action: "",
                        data: {
                            uploadType: ""
                        },
                        accept: "image/*",
                        showUploadList: false
                    }}
                    getBraftEditorHtml={this.getBraftEditorHtml} # 实时获取到editor 的内容
                >
            )
        }
    }

Thanks

Thanks to 超能刚哥 的 braft-editor , thank you very much

附上项目链接 超能刚哥