Closed kalideir closed 4 years ago
Hi everyone,
I've found this library and tried to integrate this component into a Reactjs-based dashboard I am working on, as a side project.
Although I have used the exact same component from the documentation, I am getting the error message:
TypeError: Cannot read property 'getEditorState' of undefined
import React from 'react'; import RichTextEditor from 'react-rte' class TextEditor extends React.Component { constructor(props) { super(props); this.state = { value: RichTextEditor.createEmptyValue(), } } onChange = (value) => { this.setState({ value: RichTextEditor.createValueFromString(value, 'html') }); }; render() { return ( <RichTextEditor editorState={this.state.value} onChange={this.onChange} /> ); }; } export default TextEditor;
Hi everyone,
I've found this library and tried to integrate this component into a Reactjs-based dashboard I am working on, as a side project.
Although I have used the exact same component from the documentation, I am getting the error message: