Slate: html serialize, node.getLeaves is not a function

Created on 20 Apr 2018  路  3Comments  路  Source: ianstormtaylor/slate

Following the example given on the webpage the html serializer throws the following error upon calling serialize:

Uncaught TypeError: node.getLeaves is not a function
question

Most helpful comment

@gorillatron this usually happens if you pass just JSON into serializer
you need to parse it before as like as

import { Value } from 'slate';

serialize(Value.fromJSON(yourObj))

All 3 comments

Hi, you might be using a version of the serializer that doesn't match with the version of slate. But it's kind of hard to tell because there's not a lot of information in this issue.

Could you provide some code that can reproduce your issue? Double checking your yarn.lock file and your package.json file might help.

Also there's a Slack channel where questions like this can be answered. I think this is more a support question than a bug.

Hey, thanks for using Slate! Unfortunately, we can't offer support for usage questions in the issues here because it becomes overwhelming to maintain the project if the issues are filled with questions.

However, we do have a Slack channel and people are constantly asking and answering questions in there. So I'm going to close this issue, but I definitely recommend joining the Slack channel if you want to find people that might be able to help.

Thanks for understanding!

@gorillatron this usually happens if you pass just JSON into serializer
you need to parse it before as like as

import { Value } from 'slate';

serialize(Value.fromJSON(yourObj))
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Slapbox picture Slapbox  路  3Comments

ianstormtaylor picture ianstormtaylor  路  3Comments

ezakto picture ezakto  路  3Comments

chrpeter picture chrpeter  路  3Comments

ianstormtaylor picture ianstormtaylor  路  3Comments