docs: add inlineBlock converter example to the converters configuration in Converters.mdx (#11158)

### What?
Added a quick example to showcase how to add a converter for inlineBlocks.

### Why?
This is not easy to figure out in the current version. As per [Discord discussion](https://discord.com/channels/967097582721572934/1338624577990823997)

### How?
Added a very basic 3 lines example to keep the file simple.
This commit is contained in:
Adit
2025-02-13 18:01:23 +01:00
committed by GitHub
parent 4be410cc4f
commit 24da30ab74

View File

@@ -51,6 +51,10 @@ const jsxConverters: JSXConvertersFunction = ({ defaultConverters }) => ({
// myTextBlock is the slug of the block // myTextBlock is the slug of the block
myTextBlock: ({ node }) => <div style={{ backgroundColor: 'red' }}>{node.fields.text}</div>, myTextBlock: ({ node }) => <div style={{ backgroundColor: 'red' }}>{node.fields.text}</div>,
}, },
inlineBlocks: {
// myInlineBlock is the slug of the block
myInlineBlock: ({ node }) => <span>{node.fields.text}</span>,
},
}) })
export const MyComponent = ({ lexicalData }) => { export const MyComponent = ({ lexicalData }) => {