How to use the @sanity/block-content-to-hyperscript/internals.getSerializers function in @sanity/block-content-to-hyperscript

To help you get started, we’ve selected a few @sanity/block-content-to-hyperscript examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sanity-io / block-content-to-react / src / targets / dom.js View on Github external
const React = require('react')
const {getSerializers} = require('@sanity/block-content-to-hyperscript/internals')

const renderNode = React.createElement
const {defaultSerializers, serializeSpan} = getSerializers(renderNode)

module.exports = {
  serializeSpan,
  serializers: defaultSerializers,
  renderProps: {nestMarks: true}
}

@sanity/block-content-to-hyperscript

Function for transforming Sanity block content to HyperScript

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis