Does TextArea component support preserving new lines?

If not, what's the best alternative solution?

Not sure what you are asking, can you clarify? It's a standard HTML <textarea>.

Sure. I entered some texts, in multiple lines, and saved it. But the texts displayed in one line, with all line breaks removed.

The component will not remove anything, you can check the source code for reference.

New lines are not displayed by default in HTML. You need to either use the <pre> element or set the white-space CSS attribute to a container element style="white-space: pre-line".

1 Like