rdunk / sanity-blocks-vue-component

[DEPRECATED] Vue component for rendering block content from Sanity
MIT License
71 stars 10 forks source link

Allow custom serializer for "block" type #4

Closed alejandrovrojas closed 5 years ago

alejandrovrojas commented 5 years ago

One major feature from other Portable Text tools is the ability to pass a custom serializer for block types. The default block serializer works "out of the box" only if the styles correspond to certain HTML elements, which doesn't lend itself to more abstract definitions e.g. headline instead of h1.

This is obviously possible through slots! Though perhaps an example could be added to the readme.