Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/block-content-to-react

Package Overview
Dependencies
Maintainers
24
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/block-content-to-react - npm Package Versions

234

3.0.0

Diff

Changelog

Source

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.
rexxars
published 2.0.7 •

rexxars
published 2.0.6 •

rexxars
published 2.0.5 •

rexxars
published 2.0.4 •

rexxars
published 2.0.3 •

bjoerge
published 2.0.2 •

rexxars
published 2.0.1 •

Changelog

Source

2.0.1 - 2018-07-09

Added

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

Changelog

Source

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}}
/>
rexxars
published 1.3.12 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc