hunghg255 / reactjs-tiptap-editor

A modern WYSIWYG rich text editor based on tiptap and shadcn ui for Reactjs
https://reactjs-tiptap-editor.vercel.app/
MIT License
203 stars 37 forks source link

Hydration error in nextjs form with server action #98

Closed Allacher closed 1 week ago

Allacher commented 2 weeks ago

When I use this editor in combination with react hook forms in a form which gets submitted with a nextjs server action I always get a SSR hydration error. After a lot of debugging I found out that the problem is cased by the css import.

My fix was copying the styles into my project and removing all font imports. Somehow this fixed the problem.

hunghg255 commented 2 weeks ago

@Allacher thank you for feedback,

hunghg255 commented 1 week ago

@Allacher try config next.config.js

const nextConfig = {
  transpilePackages: ['shiki'],
};