mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-14 01:57:02 +00:00
ada58df361
Change-Id: I3c618c196e504a80ca297a4132a17f1977a24fb7
49 lines
1.8 KiB
JavaScript
49 lines
1.8 KiB
JavaScript
/*!
|
|
* VisualEditor MediaWiki SequenceRegistry registrations.
|
|
*
|
|
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'wikitextItalic', 'mwWikitextWarning', '\'\'' )
|
|
);
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'wikitextNowiki', 'mwWikitextWarning', '<nowiki' )
|
|
);
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'wikitextHeading', 'heading2', [ { type: 'paragraph' }, '=', '=' ], 2 )
|
|
);
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'numberHash', 'numberWrapOnce', [ { type: 'paragraph' }, '#', ' ' ], 2 )
|
|
);
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'wikitextDefinition', 'mwWikitextWarning', [ { type: 'paragraph' }, ';' ] )
|
|
);
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'wikitextDescription', 'blockquote', [ { type: 'paragraph' }, ':' ], 1 )
|
|
);
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'wikitextTable', 'insertTable', '{|', 2 )
|
|
);
|
|
ve.ui.sequenceRegistry.register(
|
|
new ve.ui.Sequence( 'wikitextComment', 'comment', '<!--', 4 )
|
|
);
|
|
|
|
/* Help registrations */
|
|
|
|
ve.ui.commandHelpRegistry.register( 'formatting', 'heading2', {
|
|
sequences: [ 'wikitextHeading' ],
|
|
label: OO.ui.deferMsg( 'visualeditor-formatdropdown-format-heading2' )
|
|
} );
|
|
ve.ui.commandHelpRegistry.register( 'formatting', 'listNumber', { sequences: [ 'numberHash' ] } );
|
|
ve.ui.commandHelpRegistry.register( 'formatting', 'blockquote', { sequences: [ 'wikitextDescription' ] } );
|
|
ve.ui.commandHelpRegistry.register( 'insert', 'table', {
|
|
sequences: [ 'wikitextTable' ],
|
|
label: OO.ui.deferMsg( 'visualeditor-table-insert-table' )
|
|
} );
|
|
ve.ui.commandHelpRegistry.register( 'insert', 'comment', {
|
|
sequences: [ 'wikitextComment' ],
|
|
label: OO.ui.deferMsg( 'visualeditor-commentinspector-title' )
|
|
} );
|