1

I have a textarea in a Svelte component, and its value binds to a variable "content". I want line breaks to be bound to the string.

Currently, if I type the following in the text area:

"Hello,
World"

The variable "content" takes the value "Hello,World" - without the line break.

How could I include the line break?

Archie
  • 11
  • 2
  • 1
    Does this answer your question? [How do I preserve line breaks when getting text from a textarea?](https://stackoverflow.com/questions/40417527/how-do-i-preserve-line-breaks-when-getting-text-from-a-textarea) – Suleyman Celik Jan 15 '22 at 20:16

0 Answers0