From b2d272704535a772e382220f7fdb2161d42d4afc Mon Sep 17 00:00:00 2001 From: Fatimah Date: Thu, 16 Nov 2023 16:57:56 +0100 Subject: [PATCH] editor: added config prop --- src/lib/forms/RichInputField.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/forms/RichInputField.js b/src/lib/forms/RichInputField.js index c50ec0ce..04b9857a 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: null, };