leejaen / react-lz-editor

A multilingual react rich-text editor component includes media support such as texts, images, videos, audios, links etc. Development based on Draft-Js and Ant-design, good support html, markdown, draft-raw mode. 一款基于 draft-Js 和 ant-design 实现的 react 富文本编辑器组件,支持文本、图片、视频、音频、链接等元素插入,同时支持HTML、markdown、draft Raw格式。
https://leejaen.github.io/react-lz-editor/index.html
MIT License
951 stars 154 forks source link

Can't use editor according to the demo #106

Open MikeMiller3 opened 6 years ago

MikeMiller3 commented 6 years ago

desc

I saw this editor from antd docs, so I npm install react-lz-editor --save and tried in my project, but this did not work. It seemed I haven't pass the props right, but whatever I tried, it always showing the same error. my project ejected from 'create-react-app' os: win7

error

tim 20171129153903

code

import React, {Component} from 'react'
import {LzEditor} from 'react-lz-editor'

export default class Article extends Component {
    constructor(props) {
        super(props)
    }
    render() {
        return (
            <LzEditor />
        )
    }
}

dependencies

"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-lz-editor": "^0.11.6",
"antd": "^2.13.10",
leejaen commented 6 years ago

Sorry about this bug, I have fixed it and will publish to npm. PropTypes is no longer supported and has been removed, this is why the bug appears. Pls refs: https://reactjs.org/warnings/dont-call-proptypes.html

leejaen commented 6 years ago

Hi @MikeMiller3 , I have released a new version 0.11.7 on npm, could you please upgrade and try it again? Thank you!

MikeMiller3 commented 6 years ago

@leejaen It works , thank you !