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:
parent
b25666a393
commit
b3fdac2a17
|
@ -270,10 +270,13 @@
|
||||||
ed.addShortcut(mod_key + '+d', 'striketrough_desc', 'Strikethrough');
|
ed.addShortcut(mod_key + '+d', 'striketrough_desc', 'Strikethrough');
|
||||||
ed.addShortcut(mod_key + '+h', 'help_desc', 'WP_Help');
|
ed.addShortcut(mod_key + '+h', 'help_desc', 'WP_Help');
|
||||||
ed.addShortcut(mod_key + '+p', 'wordpress.wp_page_desc', 'WP_Page');
|
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();});
|
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
|
// popup buttons for images and the gallery
|
||||||
ed.onInit.add(function(ed) {
|
ed.onInit.add(function(ed) {
|
||||||
tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) {
|
tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) {
|
||||||
|
|
Loading…
Reference in New Issue