I am currently facing an issue with the useCreateBlockNote hook from the BlockNote React library in my project. Despite following the official documentation, I consistently encounter the following error:
Error Message: TypeError: Cannot read properties of undefined (reading 'plugins')
Details:
Issue: When attempting to create an editor using the useCreateBlockNote hook, the error occurs, specifically referencing the plugins property, which appears to be undefined.
Context:
I am using the useCreateBlockNote hook in a Next.js project.
I’ve tried passing an empty plugins array, but the error persists.
I’ve ensured that the initialContent is provided as per the documentation.
I suspect there might be an issue with the latest version of the BlockNote package or the way it integrates within the Next.js environment.
Steps Taken:
1.Tried initializing the editor with different configurations, including an empty plugins array.
2.Ensured that the content and editor state were being correctly initialized.
3.Updated all BlockNote-related packages and cleared the node modules.
4.mplemented client-side rendering checks to ensure that the editor is not being rendered server-side.
5.Used dynamic imports with SSR disabled in Next.js.
Despite these attempts, the error persists. I believe there may be an underlying issue with how the useCreateBlockNote hook handles plugins or its compatibility with Next.js.
Could you please provide further guidance or confirm if this is a known issue with the library? Any suggestions or fixes would be greatly appreciated.
I am currently facing an issue with the useCreateBlockNote hook from the BlockNote React library in my project. Despite following the official documentation, I consistently encounter the following error:
Details:
Issue: When attempting to create an editor using the useCreateBlockNote hook, the error occurs, specifically referencing the plugins property, which appears to be undefined.
Context:
I am using the useCreateBlockNote hook in a Next.js project.
I’ve tried passing an empty plugins array, but the error persists.
I’ve ensured that the initialContent is provided as per the documentation.
I suspect there might be an issue with the latest version of the BlockNote package or the way it integrates within the Next.js environment.
Steps Taken:
1.Tried initializing the editor with different configurations, including an empty plugins array.
2.Ensured that the content and editor state were being correctly initialized.
3.Updated all BlockNote-related packages and cleared the node modules.
4.mplemented client-side rendering checks to ensure that the editor is not being rendered server-side.
5.Used dynamic imports with SSR disabled in Next.js.
Despite these attempts, the error persists. I believe there may be an underlying issue with how the useCreateBlockNote hook handles plugins or its compatibility with Next.js.
Could you please provide further guidance or confirm if this is a known issue with the library? Any suggestions or fixes would be greatly appreciated.