2013-12-20 23:25:24 +00:00
|
|
|
/*!
|
2014-11-23 18:04:00 +00:00
|
|
|
* VisualEditor MediaWiki CommandRegistry registrations.
|
2013-12-20 23:25:24 +00:00
|
|
|
*
|
2023-12-01 16:06:11 +00:00
|
|
|
* @copyright See AUTHORS.txt
|
2013-12-20 23:25:24 +00:00
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
2015-08-02 11:24:15 +00:00
|
|
|
/* MW-specific over-rides of core command registrations */
|
2013-12-20 23:25:24 +00:00
|
|
|
|
2014-10-27 14:26:47 +00:00
|
|
|
ve.ui.commandRegistry.register(
|
2014-11-04 22:10:28 +00:00
|
|
|
new ve.ui.Command( 'insertTable', 'table', 'create',
|
|
|
|
{
|
|
|
|
args: [ {
|
2017-11-23 15:30:41 +00:00
|
|
|
caption: true,
|
2014-11-04 22:10:28 +00:00
|
|
|
header: true,
|
|
|
|
rows: 3,
|
|
|
|
cols: 4,
|
|
|
|
type: 'mwTable',
|
|
|
|
attributes: { wikitable: true }
|
|
|
|
} ],
|
2015-07-22 22:13:09 +00:00
|
|
|
supportedSelections: [ 'linear' ]
|
2014-11-04 22:10:28 +00:00
|
|
|
}
|
|
|
|
)
|
2014-10-27 14:26:47 +00:00
|
|
|
);
|
2015-11-29 17:37:10 +00:00
|
|
|
|
|
|
|
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' )
|
|
|
|
}
|
|
|
|
);
|