mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
dedc107507
By moving the registration to the code which introduce the commands, if any module such as 'media' is omitted from an integration, we don't register a command which is never used. MWCommandRegistry.js remains to be used for over-rides of core tools' exact commands, such as insertTable. Change-Id: I84b4351b980a764d3c72a564f605821ae1c761f9
24 lines
509 B
JavaScript
24 lines
509 B
JavaScript
/*!
|
|
* VisualEditor MediaWiki CommandRegistry registrations.
|
|
*
|
|
* @copyright 2011-2015 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: [ {
|
|
header: true,
|
|
rows: 3,
|
|
cols: 4,
|
|
type: 'mwTable',
|
|
attributes: { wikitable: true }
|
|
} ],
|
|
supportedSelections: [ 'linear' ]
|
|
}
|
|
)
|
|
);
|