sanity-io / block-content-to-html

Deprecated in favor of @portabletext/to-html
MIT License
20 stars 2 forks source link

Override default serializer of tags #9

Open Addibro opened 3 years ago

Addibro commented 3 years ago

Hello!

I would like to customise a couple of tags (h2, h3 etc). I added h2 to the types in my serlializser like so:

  types: {
    h2: (props) => h('h2', {class: 'custom-h2'}, ...),
    ...,
  }

But no h2 tags are affected. Is there something I'm missing?

Thanks!