mediawiki-extensions-Visual.../modules/ve-mw/ui/ve.ui.MWCommandRegistry.js
Ed Sanders d42a0772bb Move verbose copyright message to AUTHORS.txt
Avoids having to update the date in every file every year,
which we stopped doing.

Change-Id: I7bf7aa0937eef911e00772470091753a7b06fd3d
2023-12-01 16:07:39 +00:00

47 lines
917 B
JavaScript

/*!
* VisualEditor MediaWiki CommandRegistry registrations.
*
* @copyright 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' )
}
);