A
A
Alexander2018-03-19 09:23:58
JavaScript
Alexander, 2018-03-19 09:23:58

How to do line breaks after typing in textarea?

The user must enter the applicability of the goods, this will be entered into the database. Each line must be separated by a tag
. How to make it so that the user does not enter a tag after the end of each line. How can this be automated. Maybe there are other ways to implement this (plugins, libraries)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2018-03-19
@AleksandrB

text.replace(/\n/g, '<br>')not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question