User:Iritscen/vector-2022.js: Difference between revisions

From OniGalore
(Created page with "mw.hook('wikiEditor.toolbarReady').add(function($textarea) { $textarea.wikiEditor('addToToolbar', {section:'secondary', group:'default', tools: { smile: { label:'Smile!', // or use mw.message(key).escaped() 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',...")
 
(moved to Common.js)
 
(36 intermediate revisions by the same user not shown)
(No difference)

Latest revision as of 21:58, 5 May 2025

mw.hook('wikiEditor.toolbarReady').add(function($textarea)
{
  $textarea.wikiEditor('addToToolbar',
    {section:'secondary',
    group:'default',
    tools:
    {
      smile:
      {
        label:'Smile!', // or use mw.message(key).escaped() 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
          }
        }
      }
    }
  });
});