mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-13 17:56:59 +00:00
0fd785b7d9
Follows-up Ibcda91bbb164b0. ext.math.editbutton.enabler uses mw.toolbar. The toolbar interface used to be part of mediawiki.action.edit but is now in its own module. Bug: T86235 Change-Id: I37a0b8e84a9bd6a0de0386d5b9924bbbbbd7249c
14 lines
370 B
JavaScript
14 lines
370 B
JavaScript
( function ( mw ) {
|
|
if ( mw.toolbar ) {
|
|
var iconPath = mw.config.get( 'wgExtensionAssetsPath' ) + '/Math/images/';
|
|
mw.toolbar.addButton( {
|
|
imageFile: iconPath + 'button_math.png',
|
|
speedTip: mw.msg( 'math_tip' ),
|
|
tagOpen: '<math>',
|
|
tagClose: '</math>',
|
|
sampleText: mw.msg( 'math_sample' ),
|
|
imageId: 'mw-editbutton-math'
|
|
} );
|
|
}
|
|
}( mediaWiki ) );
|