What version of @strapi/blocks-react-renderer are you using?
lst
What's Wrong?
When the field content is empty, Strapi returns an empty string; however, blocks-react-renderer converts it into a <br>, which breaks the layout.
To Reproduce
I see that this was done intentionally, but I don't understand why.
|
// Handle empty paragraphs separately as they should render a <br> tag |
[
{
"type": "paragraph",
"children": [
{
"text": "",
"bold": false
}
]
}
]
Expected Behaviour
No br added
There's a similar discussion https://forum.strapi.io/t/richtext-field-returns-br-tag-when-cleared/39507
What version of
@strapi/blocks-react-rendererare you using?lst
What's Wrong?
When the field content is empty, Strapi returns an empty string; however, blocks-react-renderer converts it into a
<br>, which breaks the layout.To Reproduce
I see that this was done intentionally, but I don't understand why.
blocks-react-renderer/src/Block.tsx
Line 68 in 032e256
[ { "type": "paragraph", "children": [ { "text": "", "bold": false } ] } ]Expected Behaviour
No
braddedThere's a similar discussion https://forum.strapi.io/t/richtext-field-returns-br-tag-when-cleared/39507