mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-28 22:13:00 +00:00
1abb5a5786
Triggered by Ctrl+Shift+Space on PC. On Mac, there is no trigger, we rely on the built-in OS shortcut. Bug: T53045 Change-Id: I9630804c833d755910589022b0ca78208337d804
47 lines
957 B
JavaScript
47 lines
957 B
JavaScript
/*!
|
|
* VisualEditor MediaWiki CommandRegistry registrations.
|
|
*
|
|
* @copyright 2011-2020 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/* MW-specific over-rides of core command registrations */
|
|
|
|
ve.ui.commandRegistry.register(
|
|
new ve.ui.Command( 'insertTable', 'table', 'create',
|
|
{
|
|
args: [ {
|
|
caption: true,
|
|
header: true,
|
|
rows: 3,
|
|
cols: 4,
|
|
type: 'mwTable',
|
|
attributes: { wikitable: true }
|
|
} ],
|
|
supportedSelections: [ 'linear' ]
|
|
}
|
|
)
|
|
);
|
|
|
|
ve.ui.commandRegistry.register(
|
|
new ve.ui.Command( 'mwNonBreakingSpace', 'content', 'insert', {
|
|
args: [
|
|
[
|
|
{ type: 'mwEntity', attributes: { character: '\u00a0' } },
|
|
{ type: '/mwEntity' }
|
|
],
|
|
// annotate
|
|
true,
|
|
// collapseToEnd
|
|
true
|
|
],
|
|
supportedSelections: [ 'linear' ]
|
|
} )
|
|
);
|
|
ve.ui.triggerRegistry.register(
|
|
'mwNonBreakingSpace', {
|
|
mac: [],
|
|
pc: new ve.ui.Trigger( 'ctrl+shift+space' )
|
|
}
|
|
);
|