onChange = (value: any) => {
this.setState({ value });
- this.props.input.onChange(value.toString('html'));
+ this.props.input.onChange(
+ !!value.getEditorState().getCurrentContent().getPlainText().trim()
+ ? value.toString('html')
+ : null
+ );
}
render() {