Level 2
can anyone help me on how to fix this ?
So I am trying to fill in a form. There are around 8 input boxes in the form. I am getting an error. To debug, I tried filling in the input box one by one. I found out when I reaches the following box, an error appeared on the console, ckeditorerror.ts:108 Uncaught TypeError: Cannot read properties of undefined (reading 'name'). I am wondering what did I do wrong here ? I tried some searching and i think the data and getData() that I am using below is already correct. How can I fix this ?
<div className="col-span-2">
<Label
value={"Maklumat Tambahan"}
className={"mb-2 font-bold text-base"}
/>
<CKEditor
editor={ClassicEditor}
data={formik.values.description}
onChange={(event, editor) => {
const description = editor.getData();
formik.setFieldValue("description", description);
setData((prevData) => ({
...prevData,
description,
}));
}}
onBlur={formik.handleBlur}
config={{
toolbar: ["bold", "italic", "undo", "redo"],
}}
/>
{formik.touched.description && formik.errors.description ? (
<div className="text-red-500">
{formik.errors.description}
</div>
) : null}
<InputError message={errors.description} />
</div>
Please or to participate in this conversation.