mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Merge "Add keyboard shortcut for 'clear' button"
This commit is contained in:
commit
40e712985c
|
@ -174,7 +174,7 @@ ve.init.mw.ViewPageTarget.static.toolbarTools = [
|
||||||
];
|
];
|
||||||
|
|
||||||
ve.init.mw.ViewPageTarget.static.surfaceCommands = [
|
ve.init.mw.ViewPageTarget.static.surfaceCommands = [
|
||||||
'bold', 'italic', 'mwLink', 'undo', 'redo', 'indent', 'outdent'
|
'bold', 'italic', 'mwLink', 'undo', 'redo', 'indent', 'outdent', 'clear'
|
||||||
];
|
];
|
||||||
|
|
||||||
// TODO: Accessibility tooltips and logical tab order for prevButton and closeButton.
|
// TODO: Accessibility tooltips and logical tab order for prevButton and closeButton.
|
||||||
|
|
|
@ -39,7 +39,7 @@ ve.ui.MWMediaEditDialog.static.toolbarTools = [
|
||||||
];
|
];
|
||||||
|
|
||||||
ve.ui.MWMediaEditDialog.static.surfaceCommands = [
|
ve.ui.MWMediaEditDialog.static.surfaceCommands = [
|
||||||
'bold', 'italic', 'mwLink', 'undo', 'redo'
|
'bold', 'italic', 'mwLink', 'undo', 'redo', 'clear'
|
||||||
];
|
];
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
|
|
|
@ -39,7 +39,7 @@ ve.ui.MWReferenceDialog.static.toolbarTools = [
|
||||||
];
|
];
|
||||||
|
|
||||||
ve.ui.MWReferenceDialog.static.surfaceCommands = [
|
ve.ui.MWReferenceDialog.static.surfaceCommands = [
|
||||||
'bold', 'italic', 'mwLink', 'undo', 'redo'
|
'bold', 'italic', 'mwLink', 'undo', 'redo', 'clear'
|
||||||
];
|
];
|
||||||
|
|
||||||
/* Methods */
|
/* Methods */
|
||||||
|
|
|
@ -60,3 +60,9 @@ ve.ui.ClearButtonTool.prototype.onUpdateState = function ( nodes, full, partial
|
||||||
/* Registration */
|
/* Registration */
|
||||||
|
|
||||||
ve.ui.toolFactory.register( 'clear', ve.ui.ClearButtonTool );
|
ve.ui.toolFactory.register( 'clear', ve.ui.ClearButtonTool );
|
||||||
|
|
||||||
|
ve.ui.commandRegistry.register( 'clear', 'annotation', 'clearAll' );
|
||||||
|
|
||||||
|
ve.ui.triggerRegistry.register(
|
||||||
|
'clear', { 'mac': new ve.ui.Trigger( 'cmd+\\' ), 'pc': new ve.ui.Trigger( 'ctrl+\\' ) }
|
||||||
|
);
|
||||||
|
|
Loading…
Reference in a new issue