Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Latest commit

 

History

History
35 lines (21 loc) · 1.35 KB

CHANGELOG.md

File metadata and controls

35 lines (21 loc) · 1.35 KB

Change Log

All notable changes will be documented in this file.

3.0.0 - 2021-05-14

BREAKING

  • When encountering unknown block types, the serializer will no longer throw by default - instead if will render a hidden div with a message noting that a serializer is missing. A message will also be logged to the console. To use the old behavior of throwing un known types, pass ignoreUnknownTypes: false as a property.
  • The markFallback serializer has been renamed to unknownMark to align with the new unknownType serializer for blocks.

2.0.1 - 2018-07-09

Added

  • Add renderContainerOnSingleChild to force container to be rendered even on single-child results

2.0.0 - 2018-07-04

BREAKING

The default list item serializer now calls the block serializer to render children, unless the node style is normal.

In other words: If a list item is marked as a heading, it would previously be rendered simply as <li>Text</li>, where it will now render as <li><h1>Text</h1></li>. Normal list items will render simply as <li>Text</li>.

This can be considered as a bugfix, but also a breaking change. Should you want the old behavior back, you can override the listItem serializer as below:

const ListItemRenderer = props => <li>{props.children}</li>

<BlockContent
  blocks={input}
  serializers={{listItem: ListItemRenderer}}
/>