MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 48: Line 48:
$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
sections: {
sections: {
emoticons: {
templates: {
type: 'booklet', // Can also be 'booklet',
type: 'booklet', // Can also be 'toolbar',
label: 'Emoticons'
label: 'Templates'
// or labelMsg: 'section-emoticons-label' for a localized label
// or labelMsg: 'section-templates-label' for a localized label
}
}
}
}
Line 66: Line 66:
mfaces: {
mfaces: {
label: 'mFaces' // or use labelMsg for a localized label, see above
label: 'mFaces' // or use labelMsg for a localized label, see above
}
}
} );
$textarea.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
}
}
}
}
} );
$textarea.wikiEditor( 'addToToolbar', {
section: 'emoticons',
group: 'lfaces',
tools: {
smile: {
label: 'Emile!', // 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
}
}
}
}
}
}