Benutzer:WikiSysop/common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
KKeine Bearbeitungszusammenfassung |
KKeine Bearbeitungszusammenfassung |
||
| Zeile 13: | Zeile 13: | ||
type: 'button', | type: 'button', | ||
// icon: 'http://www.mediawiki.org/wiki/File:Btn_toolbar_tt.png', | // icon: 'http://www.mediawiki.org/wiki/File:Btn_toolbar_tt.png', | ||
oouiIcon: ' | oouiIcon: 'markup', | ||
action: { | action: { | ||
type: 'encapsulate', | type: 'encapsulate', | ||
Version vom 18. Dezember 2024, 11:09 Uhr
// Check if we're editing a page.
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
// Add a hook handler.
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
// Configure a new toolbar entry on the given $textarea jQuery object.
$textarea.wikiEditor( 'addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
math: {
label: 'InlineCode',
type: 'button',
// icon: 'http://www.mediawiki.org/wiki/File:Btn_toolbar_tt.png',
oouiIcon: 'markup',
action: {
type: 'encapsulate',
options: {
pre: '<tt>',
post: '</tt>'
}
}
}
}
} );
} );
}