Benutzer:WikiSysop/common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
KKeine Bearbeitungszusammenfassung |
KKeine Bearbeitungszusammenfassung |
||
| (9 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) { | |||
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) { | |||
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { | mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { | ||
$textarea.wikiEditor( 'addToToolbar', { | $textarea.wikiEditor( 'addToToolbar', { | ||
section: ' | section: 'advanced', | ||
group: ' | group: 'format', | ||
tools: { | tools: { | ||
code: { | |||
label: 'InlineCode', | |||
type: 'button', | |||
oouiIcon: 'markup', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '<tt>', | |||
post: '</tt>' | |||
} | |||
} | |||
} | } | ||
} | } | ||
Aktuelle Version vom 18. Dezember 2024, 11:53 Uhr
if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) {
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
$textarea.wikiEditor( 'addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
code: {
label: 'InlineCode',
type: 'button',
oouiIcon: 'markup',
action: {
type: 'encapsulate',
options: {
pre: '<tt>',
post: '</tt>'
}
}
}
}
} );
} );
}