I found that CJK article in my wordpress4.7 can't break lines properly,which contain both CJK and english characters.
Here is the article before publish.
All the lines breaked properly before publish.
Now it displayed as below after published. All lines messed ,breaked bad-formatted as unexpected way.
I had tried to fix it this way.
vim /var/www/html/wp/wp-content/themes/twentysixteen/style.css
.site-inner {
margin: 0 auto;
max-width: 1320px;
position: relative;
}
.site-content {
word-wrap: break-word;overflow:hidden;
word-break:break-all;white-space:pre-wrap;
}
To restart apache and wordpress,no effect at all.
My wordpress version is 4.7,theme is twentysixteen.
try to add this code in your functions.php theme file
function my_tinymce_fix( $init )
{
// html elements being stripped
$init['extended_valid_elements'] = 'div[*], article[*]';
// don't remove line breaks
$init['remove_linebreaks'] = false;
// convert newline characters to BR
$init['convert_newlines_to_brs'] = true;
// don't remove redundant BR
$init['remove_redundant_brs'] = false;
// pass back to wordpress
return $init;
}
add_filter('tiny_mce_before_init', 'my_tiny_mce_fix');
Try word press plugin. TinyMCE Advanced
There is option to disable automatically remove of br tag and p tag from setting page of plugin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With