Disable Visual Editor Formatting

How to Disable Visual Editor Formatting Shortcuts in WordPress

Sometimes it is very distracting to write blogs due to visual editor formatting shortcuts in WordPress. It may be due to use those keys. When writing a blog in wordpress, it is indeed an helpful tool but sometimes we have difficulties due to this shortcuts. It is possible to disable visual editor formatting shortcuts and keep the editor clean. I will try to explain this in very few and quick steps. First lets understand about these shortcuts

What are the Formatting Shortcuts available?

The feature in the recent release of wordpress called formatting shortcuts are loved by many. But many would prefer it never existed.

These formatting shortcuts are easy to use tool for those who prefer keyboard over mouse.

  • “>” : This  is used to transform paragraph into blockquote
  • “*” or “-” : It is used to create an unordered list.
  • “1.” or “1)” : This is to start an ordered list
  • “#” : This will transform into h1
  • “##” : This will transform into h2
  • “###” : This will transform into h3
  • “####” : This will transform into h4
  • “#####” : This will transform into h5
  • “######” : This will transform into h6

Disable Visual Editor Formatting

Disable Visual Editor Formatting

I find it very useful but it is sometimes confusing to use these shortcuts. To disable these shortcuts just few lines of code is what we need.

Here is the code that can be inserted into the functions.php files to override the original function and disable visual editor formatting shortcuts.

functiondisable_mce_shortcuts( $var ) {
if ( isset( $var['plugins'] ) && $var['plugins'] ) {
$var['plugins'] = explode( ',', $var['plugins'] );
$var['plugins'] = array_diff( $var['plugins'] , array( 'wptextpattern' ) );
$var['plugins'] = implode( ',', $var['plugins'] );
return $var;
add_filter( 'tiny_mce_before_init', 'disable_mce_shortcuts' );

It is just as easy as cheese. Once you have pasted the code in your wordpress functions.php file, go to your visual editor and test. Do not forget to refresh the page. 🙂

Feel free to share and spread the news. It may help somebody in need.

If you have any queries or concerns, do not hesitate to drop a note below. I will try to respond as early as possible.

If you have a requirement for Managed WordPress Hosting do check Cloudbison. We would be glad to have you onboard  .


Leave a Reply

Enter the Captcha * Time limit is exhausted. Please reload CAPTCHA.