M
M
Mikhail Pakhmutov2014-01-23 02:17:15
css
Mikhail Pakhmutov, 2014-01-23 02:17:15

Is it possible to make the br tag in the contenteditable be a line break?

Hello. Is it possible to make the br tag in the contenteditable be a line break?
What is the problem? <div></div>When you press Enter, or is added <p></p>in the case of IE. If you control pressing Enter and replace it with a br tag, then the line is not translated (if it is the last one). Firefox, for example, if the line is the last, then automatically puts two br. If you add <br>&nbsp;, then the line is wrapped, but the space is still present.
Is there a way to do this with CSS?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Pakhmutov, 2014-01-23
@ARCHANG3L

After a few weeks of searching, I finally found a solution, pasting <br>\u200Beverything works fine. But still the question remains open, are there any more humane solutions?

A
aristarhandrianov, 2015-09-14
@aristarhandrianov

Good afternoon, but can I see the code for processing the enter press in full?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question