How to bind textarea line breaks to a variable in Svelte?

Viewed 31

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?

0 Answers
Related