Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)
« MediaWiki:AJLSM-WikiEditor.js » : différence entre les versions
Aller à la navigation
Aller à la recherche
Restauration des boutons WikiEditor AJLSM - premier test |
Création de l'onglet AJLSM dans WikiEditor |
||
| Ligne 1 : | Ligne 1 : | ||
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { | mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { | ||
$textarea.wikiEditor( 'addToToolbar', { | $textarea.wikiEditor( 'addToToolbar', { | ||
section: ' | sections: { | ||
group: ' | ajlsm: { | ||
type: 'toolbar', | |||
label: 'AJLSM' | |||
} | |||
} | |||
} ); | |||
$textarea.wikiEditor( 'addToToolbar', { | |||
section: 'ajlsm', | |||
groups: { | |||
insertion: { | |||
label: 'Insertion' | |||
} | |||
} | |||
} ); | |||
$textarea.wikiEditor( 'addToToolbar', { | |||
section: 'ajlsm', | |||
group: 'insertion', | |||
tools: { | tools: { | ||
ajlsmPath: { | ajlsmPath: { | ||
Version du 6 novembre 2026 à 12:28
mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) {
$textarea.wikiEditor( 'addToToolbar', {
sections: {
ajlsm: {
type: 'toolbar',
label: 'AJLSM'
}
}
} );
$textarea.wikiEditor( 'addToToolbar', {
section: 'ajlsm',
groups: {
insertion: {
label: 'Insertion'
}
}
} );
$textarea.wikiEditor( 'addToToolbar', {
section: 'ajlsm',
group: 'insertion',
tools: {
ajlsmPath: {
label: 'Ajouter un chemin vers un fichier/dossier',
type: 'button',
icon: mw.config.get( 'wgScriptPath' ) + '/images/9/96/Toolbar-path.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{path|',
peri: '/path/to/dir-or-file',
post: '}}'
}
}
}
}
} );
} );