I am trying to use jodit-react, I used the same config outlined in this article
My ReactJs component is intuitively like below
<JoditEditor
ref={editor}
value={state.content}
config={config}
onChange={handleContentChange}
/>
I am seeing this error when I reach the related page:
Cannot read properties of undefined (reading 'document')
I appreciate your assistance
I tried adding useMemo to the change handler like below, expecting the error to go away, but no luck
const handleContentChange = useMemo((contentHtml) => {
setState((p) => ({
...p,
content: contentHtml,
}));
}, []);