Trim whitespaces
A.A
It would be great to have an option that trims text by removing unnecessary whitespace characters around it. For example, cases like this should be cleaned up:
<br/>
...content... <br/>
<br/> ...content...
<br/> ...content... <br/>
I get that in some situations, extra spaces or line breaks might be needed. But in most cases, they break the layout and end up displaying empty blocks on the page.
The issue often comes down to editors (people) accidentally leaving empty lines and hitting publish. It’s hard to catch these changes manually, and implementing serialization logic to handle this is tricky, bug-prone, and inefficient performance-wise.
BTW: @strapi/blocks-react-renderer adds a <br> tag by default even if the input field is empty!