nextjs-custom-server icon indicating copy to clipboard operation
nextjs-custom-server copied to clipboard

Slate error

Open CelsoMMiranda opened this issue 3 years ago • 2 comments

Hi, trying to use the example provided, I'm facing the issue when clicking on add new block, and then on content. Uncaught Error: [Slate] editor is invalid! you passed:{"children":[],"operations":[],"selection":null,"marks":null,"history":{"undos":[],"redos":[]}}

CelsoMMiranda avatar Jul 26 '22 16:07 CelsoMMiranda

I'm getting the same issue. A blank screen and that error when clicking on any block type.

Edit: It seems the issue likes with the just the rich text editor field. Removing that from the blocks makes the layouts work correctly.

benjchan avatar Jul 30 '22 16:07 benjchan

Hey! I was facing the same problem whith this project. Together with @jmikrut we identified the problem. For your nextjs part of the project you need to use the same version of slate as payload uses internally. At this moment that is: "slate": "0.72.8", Changing the version solved the issue for me. Hope it helps you, too!

mikemoooo avatar Sep 01 '22 17:09 mikemoooo

Thanks for posting the solution @mikemoooo.

denolfe avatar Sep 16 '22 16:09 denolfe