2 * VisualEditor UserInterface MWSyntaxHighlightDialogTool class.
4 * @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
5 * @license The MIT License (MIT); see LICENSE.txt
9 * MediaWiki UserInterface syntax highlight tool.
12 * @extends ve.ui.FragmentWindowTool
14 * @param {OO.ui.ToolGroup} toolGroup
15 * @param {Object} [config] Configuration options
17 ve.ui.MWSyntaxHighlightDialogTool = function VeUiMWSyntaxHighlightDialogTool() {
18 ve.ui.MWSyntaxHighlightDialogTool.super.apply( this, arguments );
20 OO.inheritClass( ve.ui.MWSyntaxHighlightDialogTool, ve.ui.FragmentWindowTool );
21 ve.ui.MWSyntaxHighlightDialogTool.static.name = 'syntaxhighlightDialog';
22 ve.ui.MWSyntaxHighlightDialogTool.static.group = 'object';
23 ve.ui.MWSyntaxHighlightDialogTool.static.icon = 'alienextension';
24 ve.ui.MWSyntaxHighlightDialogTool.static.title = OO.ui.deferMsg(
25 'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title' );
26 ve.ui.MWSyntaxHighlightDialogTool.static.modelClasses = [ ve.dm.MWBlockSyntaxHighlightNode ];
27 ve.ui.MWSyntaxHighlightDialogTool.static.commandName = 'syntaxhighlightDialog';
28 ve.ui.toolFactory.register( ve.ui.MWSyntaxHighlightDialogTool );
30 ve.ui.commandRegistry.register(
32 'syntaxhighlightDialog', 'window', 'open',
33 { args: [ 'syntaxhighlightDialog' ], supportedSelections: [ 'linear' ] }
37 ve.ui.sequenceRegistry.register(
38 // Don't wait for the user to type out the full <syntaxhighlight> tag
39 new ve.ui.Sequence( 'wikitextSyntax', 'syntaxhighlightDialog', '<syntax', 7 )
42 ve.ui.sequenceRegistry.register(
43 new ve.ui.Sequence( 'wikitextSource', 'syntaxhighlightDialog', '<source', 7 )
46 ve.ui.commandHelpRegistry.register( 'insert', 'syntax', {
47 sequences: [ 'wikitextSyntax', 'wikitextSource' ],
48 label: OO.ui.deferMsg( 'syntaxhighlight-visualeditor-mwsyntaxhighlightinspector-title' )