« MediaWiki:Common.js » : différence entre les versions

aucun résumé des modifications
Aucun résumé des modifications
Aucun résumé des modifications
Ligne 4 : Ligne 4 :
// Configure a new toolbar entry on the given $textarea jQuery object.
// Configure a new toolbar entry on the given $textarea jQuery object.


$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
section: 'secondary',
section: 'emoticons',
group : 'format',
group: 'faces',
tools: {
tools: {
strikethrough: {
smile: {
label: 'Barrer',
label: 'Smile!', // or use mw.message( key ).escaped() for a localized label, see above
type: 'button',
type: 'button',
icon: wgScriptPath+ '/skins/DarkVector/images/cjnext_toolbar/stroke_icon.png',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: "<s>",
pre: ":)" // text to be inserted
post: "</s>"
}
}
}
}
}
}
}
}
});
} );




} );
} );
}
}