From f955e06c8e1740988f069ba19ff1a260d13b1dca Mon Sep 17 00:00:00 2001 From: Fatimah Date: Thu, 16 Nov 2023 17:05:42 +0100 Subject: [PATCH] editor: added config prop --- src/lib/forms/RichEditor.js | 2 +- src/lib/forms/RichInputField.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/forms/RichEditor.js b/src/lib/forms/RichEditor.js index 5dd0b070..f5eba7f2 100644 --- a/src/lib/forms/RichEditor.js +++ b/src/lib/forms/RichEditor.js @@ -67,5 +67,5 @@ RichEditor.defaultProps = { onChange: undefined, onBlur: undefined, onFocus: undefined, - editorConfig: null, + editorConfig: undefined, }; diff --git a/src/lib/forms/RichInputField.js b/src/lib/forms/RichInputField.js index c50ec0ce..be6f2c54 100644 --- a/src/lib/forms/RichInputField.js +++ b/src/lib/forms/RichInputField.js @@ -14,7 +14,7 @@ import { Form } from "semantic-ui-react"; export class RichInputField extends Component { renderFormField = (formikBag) => { - const { fieldPath, label, required, className, editor } = this.props; + const { fieldPath, label, required, className, editor, editorConfig } = this.props; const value = getIn(formikBag.form.values, fieldPath, ""); const initialValue = getIn(formikBag.form.initialValues, fieldPath, ""); const error = @@ -41,6 +41,7 @@ export class RichInputField extends Component { { formikBag.form.setFieldValue(fieldPath, editor.getContent()); formikBag.form.setFieldTouched(fieldPath, true); @@ -70,6 +71,7 @@ RichInputField.propTypes = { optimized: PropTypes.bool, label: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), required: PropTypes.bool, + editorConfig: PropTypes.object, }; RichInputField.defaultProps = { @@ -78,4 +80,5 @@ RichInputField.defaultProps = { required: false, label: "", editor: undefined, + editorConfig: undefined, };