Answer the question
In order to leave comments, you need to log in
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>
, 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
After a few weeks of searching, I finally found a solution, pasting <br>\u200B
everything works fine. But still the question remains open, are there any more humane solutions?
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 questionAsk a Question
731 491 924 answers to any question