0

I am trying to use rich text editorin my Next.js project

import React from 'react'
import JoditEditor from 'jodit-react'

const Editor = () => {
  const editor = useRef(null);
  const [content, setContent] = useState('');

  return (
    <div>
      <JoditEditor
        ref={editor}
        value={content}
        onChange={newContent => setContent(newContent)}
      />
    </div>
  )
}

export default Editor

I got this Server Error:

Reference Error: self is not defined

Ahmed Sbai
  • 10,695
  • 9
  • 19
  • 38

0 Answers0