For example, this code:
<div><p>Some text here</p></div>
Becomes formatted as this:
<div>Some text here</div>
I think that this is MCE related behavior, because when I switch to visual editor and back to code editor all "p" tags disappear. How to disable it? Thank you!
For example, this code:
<div><p>Some text here</p></div>
Becomes formatted as this:
<div>Some text here</div>
I think that this is MCE related behavior, because when I switch to visual editor and back to code editor all "p" tags disappear. How to disable it? Thank you!
Share Improve this question edited Oct 22, 2019 at 14:09 butlerblog 5,1213 gold badges28 silver badges44 bronze badges asked Oct 22, 2019 at 8:47 Andrei PavlenkoAndrei Pavlenko 11 bronze badge1 Answer
Reset to default -1check this solution help full for you.
jQuery(document).ready(function(){
var a = $('div').html();
$('div').html('<p>'+a+'</p>');
});
or check this url link