MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Schauungen, Visionen & Prophezeiungen
Taurec (Diskussion | Beiträge) (Die Seite wurde geleert.) Markierung: Geleert |
Taurec (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
// 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': { | |||
'pretext': { | |||
label: 'vorformatiertes Blockzitat', | |||
type: 'button', | |||
oouiIcon: 'quotes', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: "<blockquote><poem>", | |||
post: "</poem></blockquote>" | |||
} | |||
} | |||
} | |||
} | |||
} ); | |||
} ); | |||
} |
Aktuelle Version vom 14. März 2023, 13:45 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': {
'pretext': {
label: 'vorformatiertes Blockzitat',
type: 'button',
oouiIcon: 'quotes',
action: {
type: 'encapsulate',
options: {
pre: "<blockquote><poem>",
post: "</poem></blockquote>"
}
}
}
}
} );
} );
}