TinyMCE: add the Alt + W shortcut only when DFW is loaded and Alt + G only when MCE fullscreen is loaded, fixes #21197

git-svn-id: https://develop.svn.wordpress.org/trunk@21272 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2012-07-14 01:46:54 +00:00
parent b25666a393
commit b3fdac2a17
1 changed files with 5 additions and 2 deletions

View File

@ -270,10 +270,13 @@
ed.addShortcut(mod_key + '+d', 'striketrough_desc', 'Strikethrough');
ed.addShortcut(mod_key + '+h', 'help_desc', 'WP_Help');
ed.addShortcut(mod_key + '+p', 'wordpress.wp_page_desc', 'WP_Page');
ed.addShortcut(mod_key + '+w', 'wordpress.wp_fullscreen_desc', 'wpFullScreen');
ed.addShortcut(mod_key + '+g', 'fullscreen.desc', 'mceFullScreen');
ed.addShortcut('ctrl+s', 'save_desc', function(){if('function'==typeof autosave)autosave();});
if ( /\bwpfullscreen\b/.test(ed.settings.plugins) )
ed.addShortcut(mod_key + '+w', 'wordpress.wp_fullscreen_desc', 'wpFullScreen');
else if ( /\bfullscreen\b/.test(ed.settings.plugins) )
ed.addShortcut(mod_key + '+g', 'fullscreen.desc', 'mceFullScreen');
// popup buttons for images and the gallery
ed.onInit.add(function(ed) {
tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) {