| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
ve.ui.MWHeading1FormatTool = function VeUiMWHeading1FormatTool() { |
| 18 |
ve.ui.MWHeading1FormatTool.super.apply( this, arguments ); |
| 19 |
}; |
| 20 |
OO.inheritClass( ve.ui.MWHeading1FormatTool, ve.ui.Heading1FormatTool ); |
| 21 |
ve.ui.MWHeading1FormatTool.static.title = |
| 22 |
OO.ui.deferMsg( 'visualeditor-formatdropdown-format-mw-heading1' ); |
| 23 |
ve.ui.MWHeading1FormatTool.static.format = { type: 'mwHeading', attributes: { level: 1 } }; |
| 24 |
ve.ui.toolFactory.register( ve.ui.MWHeading1FormatTool ); |
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
ve.ui.MWHeading2FormatTool = function VeUiMWHeading2FormatTool() { |
| 36 |
ve.ui.MWHeading2FormatTool.super.apply( this, arguments ); |
| 37 |
}; |
| 38 |
OO.inheritClass( ve.ui.MWHeading2FormatTool, ve.ui.Heading2FormatTool ); |
| 39 |
ve.ui.MWHeading2FormatTool.static.title = |
| 40 |
OO.ui.deferMsg( 'visualeditor-formatdropdown-format-mw-heading2' ); |
| 41 |
ve.ui.MWHeading2FormatTool.static.format = { type: 'mwHeading', attributes: { level: 2 } }; |
| 42 |
ve.ui.toolFactory.register( ve.ui.MWHeading2FormatTool ); |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
ve.ui.MWHeading3FormatTool = function VeUiMWHeading3FormatTool() { |
| 54 |
ve.ui.MWHeading3FormatTool.super.apply( this, arguments ); |
| 55 |
}; |
| 56 |
OO.inheritClass( ve.ui.MWHeading3FormatTool, ve.ui.Heading3FormatTool ); |
| 57 |
ve.ui.MWHeading3FormatTool.static.title = |
| 58 |
OO.ui.deferMsg( 'visualeditor-formatdropdown-format-mw-heading3' ); |
| 59 |
ve.ui.MWHeading3FormatTool.static.format = { type: 'mwHeading', attributes: { level: 3 } }; |
| 60 |
ve.ui.toolFactory.register( ve.ui.MWHeading3FormatTool ); |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
ve.ui.MWHeading4FormatTool = function VeUiMWHeading4FormatTool() { |
| 72 |
ve.ui.MWHeading4FormatTool.super.apply( this, arguments ); |
| 73 |
}; |
| 74 |
OO.inheritClass( ve.ui.MWHeading4FormatTool, ve.ui.Heading4FormatTool ); |
| 75 |
ve.ui.MWHeading4FormatTool.static.title = |
| 76 |
OO.ui.deferMsg( 'visualeditor-formatdropdown-format-mw-heading4' ); |
| 77 |
ve.ui.MWHeading4FormatTool.static.format = { type: 'mwHeading', attributes: { level: 4 } }; |
| 78 |
ve.ui.toolFactory.register( ve.ui.MWHeading4FormatTool ); |
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
ve.ui.MWHeading5FormatTool = function VeUiMWHeading5FormatTool() { |
| 90 |
ve.ui.MWHeading5FormatTool.super.apply( this, arguments ); |
| 91 |
}; |
| 92 |
OO.inheritClass( ve.ui.MWHeading5FormatTool, ve.ui.Heading5FormatTool ); |
| 93 |
ve.ui.MWHeading5FormatTool.static.title = |
| 94 |
OO.ui.deferMsg( 'visualeditor-formatdropdown-format-mw-heading5' ); |
| 95 |
ve.ui.MWHeading5FormatTool.static.format = { type: 'mwHeading', attributes: { level: 5 } }; |
| 96 |
ve.ui.toolFactory.register( ve.ui.MWHeading5FormatTool ); |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
ve.ui.MWHeading6FormatTool = function VeUiMWHeading6FormatTool() { |
| 108 |
ve.ui.MWHeading6FormatTool.super.apply( this, arguments ); |
| 109 |
}; |
| 110 |
OO.inheritClass( ve.ui.MWHeading6FormatTool, ve.ui.Heading6FormatTool ); |
| 111 |
ve.ui.MWHeading6FormatTool.static.title = |
| 112 |
OO.ui.deferMsg( 'visualeditor-formatdropdown-format-mw-heading6' ); |
| 113 |
ve.ui.MWHeading6FormatTool.static.format = { type: 'mwHeading', attributes: { level: 6 } }; |
| 114 |
ve.ui.toolFactory.register( ve.ui.MWHeading6FormatTool ); |
| 115 |
|
| 116 |
( function () { |
| 117 |
for ( let i = 1; i <= 6; i++ ) { |
| 118 |
ve.ui.commandRegistry.register( |
| 119 |
new ve.ui.Command( |
| 120 |
'heading' + i, 'format', 'convert', |
| 121 |
{ args: [ 'mwHeading', { level: i } ], supportedSelections: [ 'linear' ] } |
| 122 |
) |
| 123 |
); |
| 124 |
} |
| 125 |
}() ); |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
ve.ui.MWPreformattedFormatTool = function VeUiMWPreformattedFormatTool() { |
| 137 |
ve.ui.MWPreformattedFormatTool.super.apply( this, arguments ); |
| 138 |
}; |
| 139 |
OO.inheritClass( ve.ui.MWPreformattedFormatTool, ve.ui.PreformattedFormatTool ); |
| 140 |
ve.ui.MWPreformattedFormatTool.static.format = { type: 'mwPreformatted' }; |
| 141 |
ve.ui.toolFactory.register( ve.ui.MWPreformattedFormatTool ); |
| 142 |
|
| 143 |
ve.ui.commandRegistry.register( |
| 144 |
new ve.ui.Command( |
| 145 |
'preformatted', 'format', 'convert', |
| 146 |
{ args: [ 'mwPreformatted' ], supportedSelections: [ 'linear' ] } |
| 147 |
) |
| 148 |
); |