-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Hi Team,
I have been trying to convert the sanity webhook event data (which is portable text into html). However, i have a custom code block and would like to add it to the serializer. What would be the proper way to do it ? any example is really helpful, this is the last part of the webhook data that i stuck with and i am processing it on the server side.
{
"_key":"cae3d7fa8a0d",
"_type":"codeBlock",
"code":"<PortableText\n className='prose mx-auto mt-8'\n content={content}\n projectId={process.env.PROJECT_ID}\n dataset={process.env.DATASET}\n serializers={{\n code: props => {\n // console.log('Testing', props)\n return <pre>{props.children}</pre>\n },\n codeBlock: props => {\n return <CodeBlock code={props.code} language={props.language} />\n },\n }}\n/>",
"language":"html"
},
wingsooyoung and dataexcess
Metadata
Metadata
Assignees
Labels
No labels