HTML formatting issues when switching between editor tabs

I was finally able to get this fixed after some more debugging. I had previously disabled TinyMCE emojis which is what was causing the issue. After removing this code from functions.php the editor started working as it normally does. function disable_emojis() { add_filter( ‘tiny_mce_plugins’, ‘disable_emojis_tinymce’ ); } add_action( ‘init’, ‘disable_emojis’ );

WordPress no longer holding post formatting

TinyMCE – at least, as-configured for WordPress – isn’t explicitly designed for copying/pasting of text richly formatted in other word processors. That said: how are you pasting? Are you simply copy/pasting (i.e. via CTRL-C, CTRL-V; or else via right-clicking and using contextual menu commands), or are you using the “Paste From Word” button on the … Read more

How to force insertion in editor

Facilitating users to write content in an external editor, and then copy/paste it into the WordPress editor, is a fundamentally bad approach, and is fraught with issues. The WordPress editor is intended to be used to write content. You should train your users to use the post editor to write content, as opposed to using … Read more

Removing tags around tags

Greedy and Ungreedy modifier: preg_replace( ‘/<p>(.+)<\/p>/Uuis’, ‘$1’, $content ); Tested with this script: <?php $c = array(); $c[] = ‘<p>text</p>’; $c[] = ‘<p><div>text</div></p>’; $c[] = ‘<p><div><div>text</div></div></p>’; foreach ( $c as $content ) { $e = preg_replace( ‘/<p>(.+)<\/p>/Uuis’, ‘$1’, $content ); var_dump( $e ); } Also try remove_filter( ‘the_content’, ‘wpautop’ );