X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/0ee5873d56416cf0c102f9e8930322fa80762f41..a2442ad07740434e1862c22fcbd1e9fd729ed401:/src/components/text-field/text-field.tsx diff --git a/src/components/text-field/text-field.tsx b/src/components/text-field/text-field.tsx index 78e2c7fb..b2a8dd48 100644 --- a/src/components/text-field/text-field.tsx +++ b/src/components/text-field/text-field.tsx @@ -72,7 +72,11 @@ export const RichEditorTextField = withStyles(styles)( 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() {