MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 225: Line 225:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 243: Line 243:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 261: Line 261:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 279: Line 279:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 297: Line 297:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 315: Line 315:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 333: Line 333:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 351: Line 351:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 369: Line 369:
});
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'Manual',
section: 'manual',
group: 'format',
group: 'tags',
tools: {
tools: {
"template": {
"template": {
Line 514: Line 514:
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'sections': {
'Manual': {
'manual': {
'type': 'toolbar', // Can also be 'booklet'
'type': 'toolbar', // Can also be 'booklet'
'label': 'Manual'
'label': 'Manual'
Line 522: Line 522:
} );
} );
};
};
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'manual',
'groups': {
'tags': {
'label': 'Tags' // or use labelMsg for a localized label, see above
}
}
} );
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
mw.loader.using( 'user.options' ).then( function () {
mw.loader.using( 'user.options' ).then( function () {