Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've disabled pretty much every button in the visual editor, besides bold and underline. The problem is that the functionality of the other buttons are still there with the keyboard shortcuts. Is there someway to disable the keyboard shortcuts. I don't need them at all.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Not really a wordpress question - but have you tried

tinyMCE.init({
   ..
    custom_shortcuts : false
});

??

(might have a problem with IE though , on which case, you can override them with a foo function.)

function disableShortcuts(){
    tinyMCE.get('elm1').addShortcut("ctrl+b","nix","foo");
    tinyMCE.get('elm1').addShortcut("ctrl+i","nix","foo");

}

after that you will need to add the "foo" command to tinMCE:

tinyMCE.init({
   //your other stuff
        oninit : "disableShortcuts",
        setup : function(ed) {
                  // Register foo command  shortcuts
                  ed.addCommand('foo', function() {
                  //foo function does null
                  });
               }
    });
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.