From b3fdac2a17ef52ee4a8dd007e4c2657928e10af9 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Sat, 14 Jul 2012 01:46:54 +0000 Subject: [PATCH] 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 --- .../js/tinymce/plugins/wordpress/editor_plugin_src.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js index 1212ddc771..2c11519631 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js +++ b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js @@ -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) {