智慧大石
代码片段供参考: componentDidMount() { var textbox = ReactDOM.findDOMNode(this.refs.textarea); this.editor = new Simditor({ textarea: $(textbox), toolbar: ['title', 'bold', 'italic', 'underline', 'strikethrough', 'fontScale', 'color', 'ol', 'ul', 'blockquote', 'code', 'table', 'link', 'image', 'indent', 'outdent', 'alignment', 'hr'] }); this.editor.on("valuechanged", (e, src) => { this.props.fields.body.onChange(this.editor.getValue()); }); } componentDidUpdate (prevProps) { if (prevProps.body !== this.props.body) { this.editor.setValue(this.props.body); } }<textarea className="form-control" ref='textarea' rows="50" {...body}/>