MediaWiki:Gadget-Emoji.js:修订间差异
来自Limbo Wiki
小无编辑摘要 |
小 (排版) |
||
第2行: | 第2行: | ||
$textarea.wikiEditor( 'addToToolbar',{ | $textarea.wikiEditor( 'addToToolbar',{ | ||
section: 'advanced', | section: 'advanced', | ||
group: 'format', | |||
tools: { | |||
buttonId: { | |||
label: 'Comment visible only for editors', | |||
type: 'button', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: '<!-- ', | |||
peri: 'Insert comment here', | |||
post: ' -->' | |||
} | |||
} | |||
} | |||
} | |||
}); | |||
});}); | });}); |
2022年3月28日 (一) 14:32的版本
$(function() {mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { $textarea.wikiEditor( 'addToToolbar',{ section: 'advanced', group: 'format', tools: { buttonId: { label: 'Comment visible only for editors', type: 'button', action: { type: 'encapsulate', options: { pre: '<!-- ', peri: 'Insert comment here', post: ' -->' } } } } }); });});