MediaWiki:Gadget-Emoji.js:修订间差异
来自Limbo Wiki
小无编辑摘要 |
小无编辑摘要 |
||
第5行: | 第5行: | ||
tools: { | tools: { | ||
buttonId: { | buttonId: { | ||
label: ' | label: 'Gadget-emoji-tle', | ||
type: 'button', | type: 'button', | ||
action: { | action: { | ||
第11行: | 第11行: | ||
options: { | options: { | ||
pre: '<!-- ', | pre: '<!-- ', | ||
peri: ' | peri: 'Gadget-emoji-txt', | ||
post: ' -->' | post: ' -->' | ||
} | } |
2022年4月3日 (日) 14:53的版本
$(function() {mw.hook( 'wikiEditor.toolbarReady' ).add( function ( $textarea ) { $textarea.wikiEditor( 'addToToolbar',{ section: 'advanced', group: 'format', tools: { buttonId: { label: 'Gadget-emoji-tle', type: 'button', action: { type: 'encapsulate', options: { pre: '<!-- ', peri: 'Gadget-emoji-txt', post: ' -->' } } } } }); });});