4,348
edits
add a code snippet for WikiEditor customization |
add tags |
||
Line 6: | Line 6: | ||
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { | ||
'sections': { | 'sections': { | ||
' | 'tags': { | ||
'type': 'toolbar', | 'type': 'toolbar', | ||
'label': ' | 'label': 'Tags' | ||
// or 'labelMsg': 'section-emoticons-label' for a localized label | // or 'labelMsg': 'section-emoticons-label' for a localized label | ||
} | |||
}, | |||
'section': 'tags', | |||
'group': 'faces', | |||
'tools': { | |||
'smile': { | |||
label: 'Smile!', // or use labelMsg for a localized label, see above | |||
type: 'button', | |||
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a4/Gnome-face-smile.svg/22px-Gnome-face-smile.svg.png', | |||
action: { | |||
type: 'encapsulate', | |||
options: { | |||
pre: ":)" // text to be inserted | |||
} | |||
} | |||
} | } | ||
} | } |