#ckeditor #ckeditor5 Server Error ReferenceError: self is not defined

92 views Asked by At

Iam using build of NextJS cleditor5. if i refresh the page iam getting below error

Server Error ReferenceError: self is not defined

at Object. (file:///var/www/html/projects/CIT_NextJS_Base/5.5/node_modules/@ckeditor/ckeditor5-react/dist/index.js:5:244)

iam not getting what is the issue.any suggestion?

1

There are 1 answers

0
erayatesdev On

The problem should be solve if you try to import your CKEditor component via Next.js dynamic.

Sample:

const CustomEditor = dynamic(
  () => {
    return import("../components/custom-editor");
  },
  { ssr: false }
);

CustomEditor should be a component that include your CKEditor.