steven-tey / novel

Notion-style WYSIWYG editor with AI-powered autocompletion.
https://novel.sh
Apache License 2.0
11.8k stars 980 forks source link

RangeError: Schema is missing its top node type ('doc')bug: #421

Open praveenvns opened 1 week ago

praveenvns commented 1 week ago

Provide environment information

RangeError: Schema is missing its top node type ('doc')bug:

Describe the bug

Screenshot 2024-07-06 at 11 21 04 AM

My code

Screenshot 2024-07-06 at 11 22 12 AM

Editor not working at all

Link to reproduction

RangeError: Schema is missing its top node type ('doc')bug:

To reproduce

RangeError: Schema is missing its top node type ('doc')bug:

Additional information

RangeError: Schema is missing its top node type ('doc')bug:

henryobiaraije commented 1 week ago

I am getting this error two. Just tried to use this in a Nextjs App but this error shows up. The worst is that the error doesn't make any sense and does not give a hint of what is wrong. image

phyohtetarkar commented 1 week ago

You need to setup extensions and apply in editor.

import { defaultExtensions } from "./extensions";

const extensions = [...defaultExtensions];

<EditorContent
  extensions={extensions}
  ...
/>;