A clear and concise description of what the feature is
It would be incredibly helpful if blocks-react-renderer could support interpreting \n characters as line breaks in text strings.
Why should this feature be included?
This feature is essential for rendering multiline text more intuitively, especially when dealing with user-generated content or preformatted text blocks. This lack of line break support necessitates additional string manipulation and mapping in the component code, which complicates the rendering process and adds extra overhead.
Please provide an example for how this would work
Currently, when a text string containing \n characters is rendered, the \n characters are not converted into HTML line breaks ( ). For example, a text string like "This is a heading and \n\n I want this to be on a new line" is rendered as a single continuous line rather than as:
This is a heading and
I want this to be on a new line
Handling line breaks natively in blocks-react-renderer aligns with common text rendering practices and enhances the library's usability in more diverse text formatting scenarios.
A clear and concise description of what the feature is
It would be incredibly helpful if blocks-react-renderer could support interpreting \n characters as line breaks in text strings.
Why should this feature be included?
This feature is essential for rendering multiline text more intuitively, especially when dealing with user-generated content or preformatted text blocks. This lack of line break support necessitates additional string manipulation and mapping in the component code, which complicates the rendering process and adds extra overhead.
Please provide an example for how this would work
Currently, when a text string containing \n characters is rendered, the \n characters are not converted into HTML line breaks (
). For example, a text string like "This is a heading and \n\n I want this to be on a new line" is rendered as a single continuous line rather than as:
This is a heading and I want this to be on a new line
Handling line breaks natively in blocks-react-renderer aligns with common text rendering practices and enhances the library's usability in more diverse text formatting scenarios.
Thank you for considering this feature request.