diff --git a/wp-includes/js/tinymce/langs/wp-langs-en.js b/wp-includes/js/tinymce/langs/wp-langs-en.js index 53d784a28a..7269e3d4b7 100644 --- a/wp-includes/js/tinymce/langs/wp-langs-en.js +++ b/wp-includes/js/tinymce/langs/wp-langs-en.js @@ -170,7 +170,7 @@ autosave:{ unload_msg:"The changes you made will be lost if you navigate away from this page." }, fullscreen:{ -desc:"Toggle fullscreen mode (Alt + Shift + G)" +desc:"Toggle fullscreen mode (Alt + G)" }, media:{ desc:"Insert / edit embedded media", @@ -186,7 +186,7 @@ visualchars:{ desc:"Visual control characters on/off." }, spellchecker:{ -desc:"Toggle spellchecker (Alt + Shift + N)", +desc:"Toggle spellchecker (Alt + N)", menu:"Spellchecker settings", ignore_word:"Ignore word", ignore_words:"Ignore all", @@ -243,20 +243,20 @@ dd:"Definition description", bold_desc:"Bold (Ctrl + B)", italic_desc:"Italic (Ctrl + I)", underline_desc:"Underline", -striketrough_desc:"Strikethrough (Alt + Shift + D)", -justifyleft_desc:"Align Left (Alt + Shift + L)", -justifycenter_desc:"Align Center (Alt + Shift + C)", -justifyright_desc:"Align Right (Alt + Shift + R)", -justifyfull_desc:"Align Full (Alt + Shift + J)", -bullist_desc:"Unordered list (Alt + Shift + U)", -numlist_desc:"Ordered list (Alt + Shift + O)", +striketrough_desc:"Strikethrough (Alt + D)", +justifyleft_desc:"Align Left (Alt + L)", +justifycenter_desc:"Align Center (Alt + C)", +justifyright_desc:"Align Right (Alt + R)", +justifyfull_desc:"Align Full (Alt + J)", +bullist_desc:"Unordered list (Alt + U)", +numlist_desc:"Ordered list (Alt + O)", outdent_desc:"Outdent", indent_desc:"Indent", undo_desc:"Undo (Ctrl + Z)", redo_desc:"Redo (Ctrl + Y)", -link_desc:"Insert/edit link (Alt + Shift + A)", -unlink_desc:"Unlink (Alt + Shift + S)", -image_desc:"Insert/edit image (Alt + Shift + M)", +link_desc:"Insert/edit link (Alt + A)", +unlink_desc:"Unlink (Alt + S)", +image_desc:"Insert/edit image (Alt + M)", cleanup_desc:"Cleanup messy code", code_desc:"Edit HTML Source", sub_desc:"Subscript", @@ -274,7 +274,7 @@ paste_desc:"Paste", image_props_desc:"Image properties", newdocument_desc:"New document", help_desc:"Help", -blockquote_desc:"Blockquote (Alt + Shift + Q)", +blockquote_desc:"Blockquote (Alt + Q)", clipboard_msg:"Copy/Cut/Paste is not available in Mozilla and Firefox.", path:"Path", newdocument:"Are you sure you want to clear all contents?", @@ -452,10 +452,10 @@ source:"Source" }); tinyMCE.addI18n("en.wordpress",{ -wp_adv_desc:"Show/Hide Kitchen Sink (Alt + Shift + Z)", -wp_more_desc:"Insert More Tag (Alt + Shift + T)", -wp_page_desc:"Insert Page break (Alt + Shift + P)", -wp_help_desc:"Help (Alt + Shift + H)", +wp_adv_desc:"Show/Hide Kitchen Sink (Alt + Z)", +wp_more_desc:"Insert More Tag (Alt + T)", +wp_page_desc:"Insert Page break (Alt + P)", +wp_help_desc:"Help (Alt + H)", wp_more_alt:"More...", wp_page_alt:"Next page...", add_media:"Add Media", @@ -463,7 +463,8 @@ add_image:"Add an Image", add_video:"Add Video", add_audio:"Add Audio", editgallery:"Edit Gallery", -delgallery:"Delete Gallery" +delgallery:"Delete Gallery", +wp_fullscreen_desc:"Distraction Free Writing mode (Alt + W)" }); tinyMCE.addI18n("en.wpeditimage",{ diff --git a/wp-includes/js/tinymce/langs/wp-langs.php b/wp-includes/js/tinymce/langs/wp-langs.php index 04dfa0f596..05e89d870d 100644 --- a/wp-includes/js/tinymce/langs/wp-langs.php +++ b/wp-includes/js/tinymce/langs/wp-langs.php @@ -204,7 +204,7 @@ function wp_mce_translation() { ), 'fullscreen' => array( - 'desc' => __('Toggle fullscreen mode (Alt + Shift + G)') + 'desc' => __('Toggle fullscreen mode (Alt + G)') ), 'media' => array( @@ -225,7 +225,7 @@ function wp_mce_translation() { ), 'spellchecker' => array( - 'desc' => __('Toggle spellchecker (Alt + Shift + N)'), + 'desc' => __('Toggle spellchecker (Alt + N)'), 'menu' => __('Spellchecker settings'), 'ignore_word' => __('Ignore word'), 'ignore_words' => __('Ignore all'), @@ -286,20 +286,20 @@ function wp_mce_translation() { 'bold_desc' => __('Bold (Ctrl + B)'), 'italic_desc' => __('Italic (Ctrl + I)'), 'underline_desc' => __('Underline'), - 'striketrough_desc' => __('Strikethrough (Alt + Shift + D)'), - 'justifyleft_desc' => __('Align Left (Alt + Shift + L)'), - 'justifycenter_desc' => __('Align Center (Alt + Shift + C)'), - 'justifyright_desc' => __('Align Right (Alt + Shift + R)'), - 'justifyfull_desc' => __('Align Full (Alt + Shift + J)'), - 'bullist_desc' => __('Unordered list (Alt + Shift + U)'), - 'numlist_desc' => __('Ordered list (Alt + Shift + O)'), + 'striketrough_desc' => __('Strikethrough (Alt + D)'), + 'justifyleft_desc' => __('Align Left (Alt + L)'), + 'justifycenter_desc' => __('Align Center (Alt + C)'), + 'justifyright_desc' => __('Align Right (Alt + R)'), + 'justifyfull_desc' => __('Align Full (Alt + J)'), + 'bullist_desc' => __('Unordered list (Alt + U)'), + 'numlist_desc' => __('Ordered list (Alt + O)'), 'outdent_desc' => __('Outdent'), 'indent_desc' => __('Indent'), 'undo_desc' => __('Undo (Ctrl + Z)'), 'redo_desc' => __('Redo (Ctrl + Y)'), - 'link_desc' => __('Insert/edit link (Alt + Shift + A)'), - 'unlink_desc' => __('Unlink (Alt + Shift + S)'), - 'image_desc' => __('Insert/edit image (Alt + Shift + M)'), + 'link_desc' => __('Insert/edit link (Alt + A)'), + 'unlink_desc' => __('Unlink (Alt + S)'), + 'image_desc' => __('Insert/edit image (Alt + M)'), 'cleanup_desc' => __('Cleanup messy code'), 'code_desc' => __('Edit HTML Source'), 'sub_desc' => __('Subscript'), @@ -317,7 +317,7 @@ function wp_mce_translation() { 'image_props_desc' => __('Image properties'), 'newdocument_desc' => __('New document'), 'help_desc' => __('Help'), - 'blockquote_desc' => __('Blockquote (Alt + Shift + Q)'), + 'blockquote_desc' => __('Blockquote (Alt + Q)'), 'clipboard_msg' => __('Copy/Cut/Paste is not available in Mozilla and Firefox.'), 'path' => __('Path'), 'newdocument' => __('Are you sure you want to clear all contents?'), @@ -495,10 +495,10 @@ function wp_mce_translation() { ); $wordpress = array( - 'wp_adv_desc' => __('Show/Hide Kitchen Sink (Alt + Shift + Z)'), - 'wp_more_desc' => __('Insert More Tag (Alt + Shift + T)'), - 'wp_page_desc' => __('Insert Page break (Alt + Shift + P)'), - 'wp_help_desc' => __('Help (Alt + Shift + H)'), + 'wp_adv_desc' => __('Show/Hide Kitchen Sink (Alt + Z)'), + 'wp_more_desc' => __('Insert More Tag (Alt + T)'), + 'wp_page_desc' => __('Insert Page break (Alt + P)'), + 'wp_help_desc' => __('Help (Alt + H)'), 'wp_more_alt' => __('More...'), 'wp_page_alt' => __('Next page...'), 'add_media' => __('Add Media'), @@ -506,7 +506,8 @@ function wp_mce_translation() { 'add_video' => __('Add Video'), 'add_audio' => __('Add Audio'), 'editgallery' => __('Edit Gallery'), - 'delgallery' => __('Delete Gallery') + 'delgallery' => __('Delete Gallery'), + 'wp_fullscreen_desc' => __('Distraction Free Writing mode (Alt + W)') ); $wpeditimage = array( 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 40d978ff48..1212ddc771 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js +++ b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin_src.js @@ -9,7 +9,7 @@ mceTout : 0, init : function(ed, url) { - var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick; + var t = this, tbId = ed.getParam('wordpress_adv_toolbar', 'toolbar2'), last = 0, moreHTML, nextpageHTML, closeOnClick, mod_key; moreHTML = ''; nextpageHTML = ''; @@ -74,7 +74,6 @@ return; tb_show('', link.href); - tinymce.DOM.setStyle( ['TB_overlay','TB_window','TB_load'], 'z-index', '999999' ); }); // Register buttons @@ -250,30 +249,32 @@ t._handleMoreBreak(ed, url); // Add custom shortcuts - ed.addShortcut('alt+shift+c', ed.getLang('justifycenter_desc'), 'JustifyCenter'); - ed.addShortcut('alt+shift+r', ed.getLang('justifyright_desc'), 'JustifyRight'); - ed.addShortcut('alt+shift+l', ed.getLang('justifyleft_desc'), 'JustifyLeft'); - ed.addShortcut('alt+shift+j', ed.getLang('justifyfull_desc'), 'JustifyFull'); - ed.addShortcut('alt+shift+q', ed.getLang('blockquote_desc'), 'mceBlockQuote'); - ed.addShortcut('alt+shift+u', ed.getLang('bullist_desc'), 'InsertUnorderedList'); - ed.addShortcut('alt+shift+o', ed.getLang('numlist_desc'), 'InsertOrderedList'); - ed.addShortcut('alt+shift+d', ed.getLang('striketrough_desc'), 'Strikethrough'); - ed.addShortcut('alt+shift+n', ed.getLang('spellchecker.desc'), 'mceSpellCheck'); - ed.addShortcut('alt+shift+a', ed.getLang('link_desc'), 'mceLink'); - ed.addShortcut('alt+shift+s', ed.getLang('unlink_desc'), 'unlink'); - ed.addShortcut('alt+shift+m', ed.getLang('image_desc'), 'WP_Medialib'); - ed.addShortcut('alt+shift+g', ed.getLang('fullscreen.desc'), 'mceFullScreen'); - ed.addShortcut('alt+shift+z', ed.getLang('wp_adv_desc'), 'WP_Adv'); - ed.addShortcut('alt+shift+h', ed.getLang('help_desc'), 'WP_Help'); - ed.addShortcut('alt+shift+t', ed.getLang('wp_more_desc'), 'WP_More'); - ed.addShortcut('alt+shift+p', ed.getLang('wp_page_desc'), 'WP_Page'); - ed.addShortcut('ctrl+s', ed.getLang('save_desc'), function(){if('function'==typeof autosave)autosave();}); + mod_key = 'alt'; - if ( tinymce.isWebKit ) { - ed.addShortcut('alt+shift+b', ed.getLang('bold_desc'), 'Bold'); - ed.addShortcut('alt+shift+i', ed.getLang('italic_desc'), 'Italic'); - } + if ( tinymce.isIE || tinymce.isOpera ) + mod_key = 'shift+alt'; + ed.addShortcut(mod_key + '+c', 'justifycenter_desc', 'JustifyCenter'); + ed.addShortcut(mod_key + '+r', 'justifyright_desc', 'JustifyRight'); + ed.addShortcut(mod_key + '+l', 'justifyleft_desc', 'JustifyLeft'); + ed.addShortcut(mod_key + '+j', 'justifyfull_desc', 'JustifyFull'); + ed.addShortcut(mod_key + '+q', 'blockquote_desc', 'mceBlockQuote'); + ed.addShortcut(mod_key + '+u', 'bullist_desc', 'InsertUnorderedList'); + ed.addShortcut(mod_key + '+o', 'numlist_desc', 'InsertOrderedList'); + ed.addShortcut(mod_key + '+n', 'spellchecker.desc', 'mceSpellCheck'); + ed.addShortcut(mod_key + '+a', 'link_desc', 'WP_Link'); + ed.addShortcut(mod_key + '+s', 'unlink_desc', 'unlink'); + ed.addShortcut(mod_key + '+m', 'image_desc', 'WP_Medialib'); + ed.addShortcut(mod_key + '+z', 'wordpress.wp_adv_desc', 'WP_Adv'); + ed.addShortcut(mod_key + '+t', 'wordpress.wp_more_desc', 'WP_More'); + 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();}); + + // popup buttons for images and the gallery ed.onInit.add(function(ed) { tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) { ed.plugins.wordpress._hideButtons(); diff --git a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js index 9d33795f49..6cf84fdf59 100644 --- a/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js +++ b/wp-includes/js/tinymce/plugins/wpfullscreen/editor_plugin_src.js @@ -93,13 +93,21 @@ } }); + ed.addCommand('wpFullScreen', function() { + if ( typeof(fullscreen) == 'undefined' ) + return; + + if ( 'wp_mce_fullscreen' == ed.id ) + fullscreen.off(); + else + fullscreen.on(); + }); + // Register buttons - if ( 'undefined' != fullscreen ) { - ed.addButton('wp_fullscreen', { - title : 'fullscreen.desc', - onclick : function(){ fullscreen.on(); } - }); - } + ed.addButton('wp_fullscreen', { + title : 'wordpress.wp_fullscreen_desc', + cmd : 'wpFullScreen' + }); // END fullscreen //---------------------------------------------------------------- diff --git a/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js b/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js index ff1c4ebc29..6057f5c90f 100644 --- a/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js +++ b/wp-includes/js/tinymce/plugins/wplink/editor_plugin_src.js @@ -28,12 +28,10 @@ // Register example button ed.addButton('link', { - title : ed.getLang('advanced.link_desc'), + title : 'advanced.link_desc', cmd : 'WP_Link' }); - ed.addShortcut('alt+shift+a', ed.getLang('advanced.link_desc'), 'WP_Link'); - ed.onNodeChange.add(function(ed, cm, n, co) { disabled = co && n.nodeName != 'A'; }); @@ -57,4 +55,5 @@ // Register plugin tinymce.PluginManager.add('wplink', tinymce.plugins.wpLink); -})(); \ No newline at end of file +})(); + diff --git a/wp-includes/js/tinymce/wp-mce-help.php b/wp-includes/js/tinymce/wp-mce-help.php index f43fffa20c..4f096e50cd 100644 --- a/wp-includes/js/tinymce/wp-mce-help.php +++ b/wp-includes/js/tinymce/wp-mce-help.php @@ -111,6 +111,8 @@ wp_admin_css( 'wp-admin', true ); } .keys { margin-bottom: 15px; + width: 100%; + border: 0 none; } .keys p { display: inline-block; @@ -130,20 +132,10 @@ wp_admin_css( 'wp-admin', true ); #buttoncontainer a, #buttoncontainer a:hover { border-bottom: 0px; } - - .mac, - .macos .win { + .macos .win, + .windows .mac { display: none; } - - .macos span.mac { - display: inline; - } - - .macwebkit tr.mac { - display: table-row; - } - - - + +