MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 3: Line 3:
  * @stats [[File:Krinkle_InsertWikiEditorButton.js]]
  * @stats [[File:Krinkle_InsertWikiEditorButton.js]]
  */
  */
/* Custom toolbar code starts here*/


var customizeToolbar = function() {
var customizeToolbar = function() {
Line 14: Line 16:
}
}
} );
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'emoticons',
'groups': {
'faces': {
'label': 'Faces' // or use labelMsg for a localized label, see above
}
}
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'emoticons',
'group': 'faces',
'tools': {
'smile': {
label: 'Smile!', // or use labelMsg for a localized label, see above
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png',
action: {
type: 'encapsulate',
options: {
pre: ":)" // text to be inserted
}
}
}
}
} );
/* Custom code ends here*/
};
};
   
   
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar . . . */
Autochecked users, Bureaucrats, Editors, oversight, recentchangescleanup, Reviewers, rollback, Administrators
19,746

edits