portabletext/react-portabletext

cannot override types block

dukemai opened this issue · 3 comments

it seems that the lib does not handle block customisation in types. I did like this

types: { block: ({ children }) => { console.log("a"); return <span>{children}</span>; }, },

and it does not do anything. I need to do in block part instead

Do you have steps to reproduce this or a code sandbox demo?

I'm having the same issue...I'm working off the examples in the documentation and can't access anything block. Tried inside of "types" and outside as a standalone
Edit: you have to pass block: ({ children }) => { console.log("a"); return <span>{children}</span>; }
before types. Doesn't seem to inside of types or outside of types and after.

This should be fixed in 3.0.0