Don’t like the formatting shortcuts that were introduced in WordPress 4.3? Find it a bit distracting? Recently, one of our users asked us how to disable visual editor formatting shortcuts in WordPress. In this article, we will show you how to disable visual editor formatting shortcuts in WordPress 4.3.
What are Formatting Shortcuts and How to Use Them?
WordPress 4.3 came with a new feature called formatting shortcuts. It allows users to quickly add common text formatting without removing their hands from the keyboard and without writing any HTML.
- Using * or – will start an unordered list.
- Using 1. or 1) will start an ordered list.
- Using # will transform into h1. ## for h2, ### for h3 and so on.
- Using > will transform into blockquote.
Video Tutorial
If you don’t like the video or need more instructions, then continue reading.
Disabling Visual Editor Formatting Shortcuts
While we think that formatting shortcuts are awesome, some users are finding this feature a bit confusing and distracting.
If you want to disable the formatting shortcuts in WordPress, then follow the instructions below:
Copy and paste this code in your theme’s functions.php file or in a site-specific plugin.
function disable_mce_wptextpattern( $opt ) { if ( isset( $opt['plugins'] ) && $opt['plugins'] ) { $opt['plugins'] = explode( ',', $opt['plugins'] ); $opt['plugins'] = array_diff( $opt['plugins'] , array( 'wptextpattern' ) ); $opt['plugins'] = implode( ',', $opt['plugins'] ); } return $opt; } add_filter( 'tiny_mce_before_init', 'disable_mce_wptextpattern' );
This code simply removes text formatting shortcuts from your WordPress visual editor. Your other WordPress keyboard shortcuts will work as usual.
We hope this article helped you disable visual editor formatting shortcuts in WordPress 4.3 and later versions. You may also want to see these 14 tips for mastering the WordPress visual editor.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Rudy
Excellent, and thank you! I am going to use this in our numerous WordPress installations. It’s a bit awkward to do it in each theme, but since we use child themes exclusively, it should be a one-time edit. Our staff will be pleased to know these ridiculous shortcuts are going to be disabled.
Rudy
Actually, it was easier to do this as a plugin, as I can then deploy it in multisite to all sites in a network. Tested and working fine. Thanks again!
Bill
Awesome, thanks!
Palla Sridhar
Hello.
I have a different problem. I’m trying to add “schema markup” code in Text editor of Wordpress post. But when I save it in Text view and go to Visual tab, its getting deleted. Is there a solution for this kind of problem.?
WPBeginner Support
You will have to write it in text editor. Visual editor uses several functions to sanitize the code used by a user in posts.
Admin
Trish
Thanks for this. I haven’t upgraded yet but I have very specific requirements for my list formatting and the shortcuts would interfere with this.
Adrienne
I love the shortcuts….. makes it fast and easy then going into the text editor and adding all the time.