V
V
Viktor2015-11-03 13:23:59
JavaScript
Viktor, 2015-11-03 13:23:59

How in this case to make the correct line break?

How to make a line break, in my case I enter some text in I textareapress the button and the same text appears in another text area + adds elements to everything
For example, I enter "Some text" into the first area
The output is: + 'Some text \n'
But if in the first case I switch to a new line, it turns out something like this + 'Some text
Another one\n'
and you need something like this from a new line:
+ 'Some text\n'
+ 'Another text\ n'
Here's my code: Jsfiddle
What is the right way to set a line break in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yaroslav Lyzlov, 2015-11-03
@dixoNich

jsfiddle.net/1mtuf9Lu/1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question