diff --git a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js index d342b42c56..b18559c1c0 100644 --- a/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js +++ b/modules/ve-mw/init/targets/ve.init.mw.ViewPageTarget.js @@ -174,7 +174,7 @@ ve.init.mw.ViewPageTarget.static.toolbarTools = [ ]; 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. diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js index 6a74c8ffed..7df58d9cb8 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWMediaEditDialog.js @@ -39,7 +39,7 @@ ve.ui.MWMediaEditDialog.static.toolbarTools = [ ]; ve.ui.MWMediaEditDialog.static.surfaceCommands = [ - 'bold', 'italic', 'mwLink', 'undo', 'redo' + 'bold', 'italic', 'mwLink', 'undo', 'redo', 'clear' ]; /* Methods */ diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js index b2b8223837..9e12c40094 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js @@ -39,7 +39,7 @@ ve.ui.MWReferenceDialog.static.toolbarTools = [ ]; ve.ui.MWReferenceDialog.static.surfaceCommands = [ - 'bold', 'italic', 'mwLink', 'undo', 'redo' + 'bold', 'italic', 'mwLink', 'undo', 'redo', 'clear' ]; /* Methods */ diff --git a/modules/ve/ui/tools/buttons/ve.ui.ClearButtonTool.js b/modules/ve/ui/tools/buttons/ve.ui.ClearButtonTool.js index 9a6d2f95e2..07059dc9f5 100644 --- a/modules/ve/ui/tools/buttons/ve.ui.ClearButtonTool.js +++ b/modules/ve/ui/tools/buttons/ve.ui.ClearButtonTool.js @@ -60,3 +60,9 @@ ve.ui.ClearButtonTool.prototype.onUpdateState = function ( nodes, full, partial /* Registration */ 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+\\' ) } +);