|
@@ -24,6 +24,8 @@ import unlinkIcon from '../theme/icons/unlink.svg';
|
|
|
|
|
|
|
|
import '../theme/theme.scss';
|
|
import '../theme/theme.scss';
|
|
|
|
|
|
|
|
|
|
+const linkKeystroke = 'Ctrl+K';
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* The link plugin. It introduces the Link and Unlink buttons and the <kbd>Ctrl+K</kbd> keystroke.
|
|
* The link plugin. It introduces the Link and Unlink buttons and the <kbd>Ctrl+K</kbd> keystroke.
|
|
|
*
|
|
*
|
|
@@ -124,7 +126,7 @@ export default class Link extends Plugin {
|
|
|
const t = editor.t;
|
|
const t = editor.t;
|
|
|
|
|
|
|
|
// Handle `Ctrl+K` keystroke and show the panel.
|
|
// Handle `Ctrl+K` keystroke and show the panel.
|
|
|
- editor.keystrokes.set( 'CTRL+K', () => {
|
|
|
|
|
|
|
+ editor.keystrokes.set( linkKeystroke, () => {
|
|
|
if ( linkCommand.isEnabled ) {
|
|
if ( linkCommand.isEnabled ) {
|
|
|
this._showPanel( true );
|
|
this._showPanel( true );
|
|
|
}
|
|
}
|
|
@@ -136,7 +138,7 @@ export default class Link extends Plugin {
|
|
|
button.isEnabled = true;
|
|
button.isEnabled = true;
|
|
|
button.label = t( 'Link' );
|
|
button.label = t( 'Link' );
|
|
|
button.icon = linkIcon;
|
|
button.icon = linkIcon;
|
|
|
- button.keystroke = 'CTRL+K';
|
|
|
|
|
|
|
+ button.keystroke = linkKeystroke;
|
|
|
button.tooltip = true;
|
|
button.tooltip = true;
|
|
|
|
|
|
|
|
// Bind button to the command.
|
|
// Bind button to the command.
|