Debian Codegraph @

extensions/VisualEditor/modules/ve-mw/ui/ve.ui.MWCommandRegistry.js

raw symbols SCIP
1 /*!
2 * VisualEditor MediaWiki CommandRegistry registrations.
3 *
4 * @copyright See AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
6 */
7
8 /* MW-specific over-rides of core command registrations */
9
10 ve.ui.commandRegistry.register(
11 new ve.ui.Command( 'insertTable', 'table', 'create',
12 {
13 args: [ {
14 caption: true,
15 header: true,
16 rows: 3,
17 cols: 4,
18 type: 'mwTable',
19 attributes: { wikitable: true }
20 } ],
21 supportedSelections: [ 'linear' ]
22 }
23 )
24 );
25
26 ve.ui.commandRegistry.register(
27 new ve.ui.Command( 'mwNonBreakingSpace', 'content', 'insert', {
28 args: [
29 [
30 { type: 'mwEntity', attributes: { character: '\u00a0' } },
31 { type: '/mwEntity' }
32 ],
33 // annotate
34 true,
35 // collapseToEnd
36 true
37 ],
38 supportedSelections: [ 'linear' ]
39 } )
40 );
41 ve.ui.triggerRegistry.register(
42 'mwNonBreakingSpace', {
43 mac: [],
44 pc: new ve.ui.Trigger( 'ctrl+shift+space' )
45 }
46 );