How to Apply Line Breaks Typed in a Textarea to an Input
In my case, I took the line breaks from the Textarea, which appear as \n in the string, matched them with /\n/g using replace, and changed them to a ' ' character.
js
console.log(bookingRequestDetail?.data.memo?.content.replace(/\n/g, ' '));- #input line breaks
- #textarea line breaks