Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/components/inputs/formik-text-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ const FormikTextEditor = ({ name, ...props }) => {
name={name}
id={name}
value={values[name]}
onChange={(e) => setFieldValue(name, e.target.value)}
onChange={(e) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niko-exo

  1. lets create helper method
    called normalizeJoditEmpty
    2.and lets conver also there some edge cases


    /  

const stringValue =
e.target.value === "<p><br></p>" ? "" : e.target.value;

setFieldValue(name, stringValue);
}}
onBlur={() => setFieldTouched(name, true)}
error={touched?.[name] && errors?.[name] ? errors?.[name] : ""}
license={process.env.JODIT_LICENSE_KEY}
Expand Down