Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onClick(e) {
const data = {
type: constants.PLUGIN_TYPE,
caption: "Initial plugin text",
};
this.props.onChange(insertDataBlock(this.props.editorState, data));
}
onSave(tableConfig) {
this.setState({isEditing: false});
const data = {
type: constants.PLUGIN_TYPE,
...tableConfig
};
this.props.onChange(insertDataBlock(this.props.editorState, data));
}
onClick(e) {
const data = {articles: [{key: DraftJS.genKey()}], type: constants.PLUGIN_TYPE};
this.props.onChange(insertDataBlock(this.props.editorState, data));
}