Difference between revisions of "User:Root/common.js"
m |
m |
||
Line 31: | Line 31: | ||
}); | }); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
var customizeToolbar = function () { | var customizeToolbar = function () { | ||
Line 66: | Line 44: | ||
} ); | } ); | ||
}; | }; | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 03:01, 22 June 2017
/**
* Extra buttons in toolbar
* @stats [[File:Krinkle_InsertWikiEditorButton.js]]
*/
$.ajax({
url: '//localhost:8001/index.php?title=MediaWiki:InsertWikiEditorButton.js&action=raw&ctype=text/javascript',
dataType: 'script',
cache: true
}).done(function () {
// Happy face
krInsertWikiEditorButton({
id: "mw-text-blue",
icon: "/images/BoutonsDefaut03.png",
label: 'make-text-blue',
insertBefore: '<font color="blue">',
insertAfter: '</font>',
sampleText: 'past your text'
});
// Monkey
krInsertWikiEditorButton({
id: 'mw-text-red',
icon: '/images/redtext.png',
label: 'make-text-red',
insertBefore: '<font color="red">',
insertAfter: '</font>',
sampleText: 'past your text'
});
});
var customizeToolbar = function () {
/* Your code goes here */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'emoticons': {
'type': 'toolbar', // Can also be 'booklet'
'label': 'Emoticons'
// or 'labelMsg': 'section-emoticons-label' for a localized label
}
}
} );
};