Changeset 43915
- Timestamp:
- 11/21/2018 12:27:12 PM (6 years ago)
- Location:
- branches/5.0/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-includes/class-wp-editor.php
r43758 r43915 1269 1269 // Shortcuts help modal 1270 1270 'Keyboard Shortcuts' => array( __( 'Keyboard Shortcuts' ), 'accessH' ), 1271 'Classic Block Keyboard Shortcuts' => __( 'Classic Block Keyboard Shortcuts' ), 1271 1272 'Default shortcuts,' => __( 'Default shortcuts,' ), 1272 1273 'Additional shortcuts,' => __( 'Additional shortcuts,' ), -
branches/5.0/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
r43890 r43915 371 371 372 372 dialog = editor.windowManager.open( { 373 title: 'Keyboard Shortcuts',373 title: editor.settings.classic_block_editor ? 'Classic Block Keyboard Shortcuts' : 'Keyboard Shortcuts', 374 374 items: { 375 375 type: 'container', … … 653 653 o: 'InsertOrderedList', 654 654 m: 'WP_Medialib', 655 z: 'WP_Adv',656 655 t: 'WP_More', 657 656 d: 'Strikethrough', 658 h: 'WP_Help',659 657 p: 'WP_Page', 660 658 x: 'WP_Code' … … 668 666 } 669 667 } ); 668 669 // Alt+Shift+Z removes a block in the Block Editor, don't add it to the Classic Block. 670 if ( ! editor.settings.classic_block_editor ) { 671 editor.addShortcut( 'access+z', '', 'WP_Adv' ); 672 } 673 674 // Workaround for not triggering the global help modal in the Block Editor by the Classic Block shortcut. 675 editor.on( 'keydown', function( event ) { 676 if ( event.shiftKey && event.altKey && event.code === 'KeyH' ) { 677 editor.execCommand( 'WP_Help' ); 678 event.stopPropagation(); 679 event.stopImmediatePropagation(); 680 return false; 681 } 682 683 return true; 684 }); 670 685 671 686 if ( window.getUserSetting( 'editor_plain_text_paste_warning' ) > 1 ) {
Note: See TracChangeset
for help on using the changeset viewer.