Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleEditorChange = editor => (value, _, source) => {
if (this.resizeModule && this.resizeModule.img) {
this.resizeModule.onUpdate()
}
this.setState({
page: {
...this.state.page,
subject: editor === editorTypes.SUBJECT ? value : this.state.page.subject,
body: editor === editorTypes.BODY ? value : this.state.page.body
}
})
if (source === Quill.sources.USER && !this.props.dirty) {
this.props.setDirty(true)
}
}