Error using Slate editor

Hi, I'm using Plone 6 with Volto and I've configured the Slate editor as default editor. When I try to create a new page I'm getting the following error

In the browser console I've found this error:

Uncaught Error: [Slate] editor is invalid! You passed: {"children":[],"operations":[],"selection":null,"marks":null,"history":{"undos":[],"redos":[]},"dataTransferFormatsOrder":["application/x-slate-fragment","text/html","files","text/plain"],"dataTransferHandlers":{},"htmlTagsToSlate":{},"uid":"f4bdf843-bec1-4260-9b11-c2b9f102df1b"}

I'm using the following versions:

  • @plone/volto: 17.15.5
  • volto-slate: 6.4.0
  • slate-react: 0.71.0
  • slate: 0.71.0

Can anyone help me?

volto-slate is builtin with Volto 17, there's no need to setup anything for it. The volto-slate that ships with volto is at a different version for Volto 17.15.5

Thanks for your reply.

I didn't configure my project for volto-slate. I've found it in my node_modules folder.

It seems that is required by volto.

I've tried to remove the old volto-slate folder from node_modules and I get this error:

Error: Cannot find module 'volto-slate'
Require stack:
- /project_folder/volto/node_modules/@plone/volto/addon-registry.js
- /project_folder/volto/node_modules/@plone/volto/razzle.config.js
- /project_folder/volto/razzle.config.js
- /project_folder/volto/node_modules/razzle/config/loadRazzleConfig.js
- /project_folder/volto/node_modules/razzle/scripts/start.js

I've found the problem. The old volto-slate package was a dependency of @eeacms/volto-cards-block add-on. Removing that add-on from my project everything works.

Thansk for your help :slight_smile:

GitHub - eea/volto-cards-block: Volto Cards block is no longer supported and has been archived from 2022. If you need something similar see
GitHub - eea/volto-block-image-cards
or
GitHub - eea/volto-listing-block: Volto Listing Block Enhanced

Thank you for you suggestions.

1 Like