wpLink: change the text label to Link text, always focus the URK field, fix Ctrl/Cmd + K shortcut. See #28206.
git-svn-id: https://develop.svn.wordpress.org/trunk@31714 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
bfbcfe3e6a
commit
df6e920a87
@ -1449,7 +1449,7 @@ final class _WP_Editors {
|
||||
<div id="link-options">
|
||||
<p class="howto"><?php _e( 'Enter the destination URL' ); ?></p>
|
||||
<div class="wp-link-text-field">
|
||||
<label><span><?php _e( 'Text' ); ?></span><input id="wp-link-text" type="text" /></label>
|
||||
<label><span><?php _e( 'Link text' ); ?></span><input id="wp-link-text" type="text" /></label>
|
||||
</div>
|
||||
<div>
|
||||
<label><span><?php _e( 'URL' ); ?></span><input id="wp-link-url" type="text" /></label>
|
||||
|
@ -5,14 +5,13 @@ tinymce.PluginManager.add( 'wplink', function( editor ) {
|
||||
});
|
||||
|
||||
// WP default shortcut
|
||||
editor.addShortcut( 'alt+shift+a', '', 'WP_Link' );
|
||||
editor.addShortcut( 'Alt+Shift+A', '', 'WP_Link' );
|
||||
// The "de-facto standard" shortcut, see #27305
|
||||
editor.addShortcut( 'ctrl+k', '', 'WP_Link' );
|
||||
editor.addShortcut( 'Meta+K', '', 'WP_Link' );
|
||||
|
||||
editor.addButton( 'link', {
|
||||
icon: 'link',
|
||||
tooltip: 'Insert/edit link',
|
||||
shortcut: 'Alt+Shift+A',
|
||||
cmd: 'WP_Link',
|
||||
stateSelector: 'a[href]'
|
||||
});
|
||||
@ -26,7 +25,6 @@ tinymce.PluginManager.add( 'wplink', function( editor ) {
|
||||
editor.addMenuItem( 'link', {
|
||||
icon: 'link',
|
||||
text: 'Insert link',
|
||||
shortcut: 'Alt+Shift+A',
|
||||
cmd: 'WP_Link',
|
||||
stateSelector: 'a[href]',
|
||||
context: 'insert',
|
||||
|
@ -161,11 +161,7 @@ var wpLink;
|
||||
// Focus the URL field and highlight its contents.
|
||||
// If this is moved above the selection changes,
|
||||
// IE will show a flashing cursor over the dialog.
|
||||
if ( inputs.wrap.hasClass( 'has-text-field' ) ) {
|
||||
inputs.text.focus();
|
||||
} else {
|
||||
inputs.url.focus()[0].select();
|
||||
}
|
||||
inputs.url.focus()[0].select();
|
||||
}
|
||||
|
||||
// Load the most recent results if this is the first time opening the panel.
|
||||
|
Loading…
Reference in New Issue
Block a user