Benutzer: Noeth/common.js: Unterschied zwischen den Versionen

Aus Joachim Camerarius (1500-1574)
Wechseln zu: Navigation, Suche
Die Seite wurde neu angelegt: „// Check if we're editing a page. if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) { // Add a hook handler. mw.hook( 'wikiEditor.too…“
(kein Unterschied)

Version vom 17. August 2022, 12:21 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', {
$textarea.wikiEditor( 'addToToolbar', {
	sections: {
		emoticons: {
			type: 'toolbar', // Can also be 'booklet',
			label: 'Emoticons'
			// or labelMsg: 'section-emoticons-label' for a localized label
		}
	}
} );
		} );
	} );
}