Documentation clarification for serializing to plain text #5136
alex-breen
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Issue:
When serializing to plain text, using
Node.string
, (as documented here: https://docs.slatejs.org/concepts/10-serializing), nodes with children of type "list-items"(e.g. "bulleted-list") are not separated by a space or new line. This can result in two distinct words being concatenated into one nonsense word.For Example:
Content:
Slate JSON:
Plain text result ("bulletSecond"):
So instead of using this code from the documentation:
I implemented the following:
I have posted this in case it is useful to others (and also in case anyone recognizes something I've missed).
Beta Was this translation helpful? Give feedback.
All reactions