D
D
devhub162018-01-08 17:16:15
Design
devhub16, 2018-01-08 17:16:15

How to replace div with br (when sending text from contenteditable div) in php via regular expressions?

Hello everyone
There was such a problem: in browsers, when entering text in a contenteditable div, the text is wrapped in <div></div>or <p></p>, if I enter the next line, then it is inserted <div><br></div>. How to make through regular expressions so that the text located in <div>ТЕКСТ</div>or <p>ТЕКСТ</p>changes toТЕКСТ<br>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Shimpanze, 2019-10-28
@PINTAGON

It's called "Landing Page"

E
Exploding, 2018-01-08
@devhub16

Oh, that's a bad omen! You don’t know what trouble you are calling on yourself. Well, it doesn’t matter, it’s definitely a hemorrhagic :)
You sit like that, washed down a beautiful article, where you highlighted it with a paragraph, where you made the text bolder , where you paid attention in italics , filled some important etensions in red! Satisfied with yourself, you praise yourself what a master, everything was so superbly washed down.
And on that good note... click "Save"...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question