MediaWiki:Common.js: Unterschied zwischen den Versionen
Aus Schauungen, Visionen & Prophezeiungen
Taurec (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
Taurec (Diskussion | Beiträge) KKeine Bearbeitungszusammenfassung |
||
Zeile 15: | Zeile 15: | ||
type: 'encapsulate', | type: 'encapsulate', | ||
options: { | options: { | ||
pre: "< | pre: "<blockquote><poem>", | ||
post: "</poem></blockquote>" | 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>"
}
}
}
}
} );
} );
}