How to use the @sanity/block-content-to-hyperscript/internals.blocksToNodes 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 rdunk / sanity-blocks-vue-component / src / blocksToVue.js View on Github external
vueProps = data.node
        sanityProps._sanityProps = {
          node: data.node,
          options: data.options
        }
      }
      const props = objectAssign({}, vueProps, sanityProps)
      data = {props}
    }

    return createElement(tag, data, childNodes)
  }

  const {defaultSerializers, serializeSpan} = getSerializers(renderNode)

  return blocksToNodes(renderNode, options, defaultSerializers, serializeSpan)
}

@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