| | |
| | | |
| | | state = { |
| | | editorState: '', |
| | | encryption: 'false', |
| | | encryption: 'false' |
| | | } |
| | | |
| | | UNSAFE_componentWillMount () { |
| | |
| | | encryption |
| | | }) |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) |
| | | } |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { config } = this.props |
| | | const { editorState } = this.state |
| | | |
| | | let style = null |
| | | if (config && config.contHeidht) { |
| | | style = {'--editor-height': config.contHeidht < 100 ? config.contHeidht + 'vh' : config.contHeidht + 'px'} |
| | | } |
| | | |
| | | return ( |
| | | <div className="normal-braft-editor"> |
| | | <div className="normal-braft-editor" style={style}> |
| | | <BraftEditor |
| | | value={editorState} |
| | | onChange={this.handleEditorChange} |