Ticket #36781: 36781.diff
File 36781.diff, 2.0 KB (added by , 7 years ago) |
---|
-
src/wp-includes/js/tinymce/plugins/wordpress/plugin.js
540 540 q: 'mceBlockQuote', 541 541 u: 'InsertUnorderedList', 542 542 o: 'InsertOrderedList', 543 s: ' unlink',543 s: 'wp_unlink', 544 544 m: 'WP_Medialib', 545 545 z: 'WP_Adv', 546 546 t: 'WP_More', -
src/wp-includes/js/tinymce/plugins/wplink/plugin.js
305 305 } 306 306 } ); 307 307 308 editor.addCommand( 'wp_unlink', function() { 309 editor.execCommand( 'unlink' ); 310 editor.execCommand( 'wp_link_cancel' ); 311 312 } ); 313 308 314 // WP default shortcut 309 315 editor.addShortcut( 'access+a', '', 'WP_Link' ); 310 316 // The "de-facto standard" shortcut, see #27305 … … 367 373 // When doing undo and redo with keyboard shortcuts (Ctrl|Cmd+Z, Ctrl|Cmd+Shift+Z, Ctrl|Cmd+Y), 368 374 // set a flag to not focus the inline dialog. The editor has to remain focused so the users can do consecutive undo/redo. 369 375 editor.on( 'keydown', function( event ) { 376 if ( event.keyCode === 27 ) { // Esc 377 editor.execCommand( 'wp_link_cancel' ); 378 } 379 370 380 if ( event.altKey || ( tinymce.Env.mac && ( ! event.metaKey || event.ctrlKey ) ) || 371 381 ( ! tinymce.Env.mac && ! event.ctrlKey ) ) { 372 382 … … 560 570 toolbar.$el.find( '.wp-link-preview a' ).removeClass( 'wplink-url-error' ).attr( 'title', null ); 561 571 } 562 572 } 573 } else { 574 editor.execCommand( 'wp_link_cancel' ); 575 563 576 } 564 577 } ); 565 578 … … 572 585 editor.addButton( 'wp_link_remove', { 573 586 tooltip: 'Remove', 574 587 icon: 'dashicon dashicons-no', 575 cmd: ' unlink'588 cmd: 'wp_unlink' 576 589 } ); 577 590 578 591 editor.addButton( 'wp_link_advanced', {