Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handlePastedText(text: string, html: ?string, editorState: EditorState) {
const { stripPastedStyles } = this.props;
// Leave paste handling to Draft.js when stripping styles is desirable.
if (stripPastedStyles) {
return NOT_HANDLED;
}
const pastedState = handleDraftEditorPastedText(html, editorState);
if (pastedState) {
this.onChange(pastedState);
return HANDLED;
}
return NOT_HANDLED;
}