TinyMCE: replace the editor iframe title on MacOS to fix the help shortcut.

Props afercia, azaozz.
Fixes #36863.
Built from https://develop.svn.wordpress.org/trunk@38110


git-svn-id: http://core.svn.wordpress.org/trunk@38051 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2016-07-20 01:39:31 +00:00
parent 6c7a60ffb4
commit ba81f46c64
5 changed files with 9 additions and 3 deletions

View File

@ -1023,7 +1023,8 @@ final class _WP_Editors {
/* translators: word count */
'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ),
'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' ) . "\n\n" . __( 'If you’re looking to paste rich content from Microsoft Word, try turning this option off. The editor will clean up text pasted from Word automatically.' ),
'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => __( 'Rich Text Area. Press Alt-Shift-H for help' ),
'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => __( 'Rich Text Area. Press Alt-Shift-H for help.' ),
'Rich Text Area. Press Control-Option-H for help.' => __( 'Rich Text Area. Press Control-Option-H for help.' ),
'You have unsaved changes are you sure you want to navigate away?' => __( 'The changes you made will be lost if you navigate away from this page.' ),
'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => __( 'Your browser does not support direct access to the clipboard. Please use keyboard shortcuts or your browser’s edit menu instead.' ),

View File

@ -579,6 +579,11 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
if ( window.getUserSetting( 'editor_plain_text_paste_warning' ) > 1 ) {
editor.settings.paste_plaintext_inform = false;
}
// Change the editor iframe title on MacOS, add the correct help shortcut.
if ( tinymce.Env.mac ) {
tinymce.$( editor.iframeElement ).attr( 'title', __( 'Rich Text Area. Press Control-Option-H for help.' ) );
}
} );
editor.on( 'PastePlainTextToggle', function( event ) {

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-beta3-38109';
$wp_version = '4.6-beta3-38110';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.