MediaWiki:Gadget-CodeBlock.js: Difference between revisions

From Wiki Maui Linux NET
Jump to navigation Jump to search
Created page with "mw.loader.using('ext.wikiEditor').then(function () { $(function () { $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'insert', groups: { code: { label: 'Code' } }, tools: { codeblock: { label: 'Codeblock', type: 'button', icon: '//upload.wikimedia.org/wikipedia/commons/6/6a/OOjs_UI_icon_code.svg', action: { type: 'encapsulate', options: { pre: '<syntaxhigh..."
 
(No difference)

Latest revision as of 20:14, 5 October 2025

mw.loader.using('ext.wikiEditor').then(function () {
  $(function () {
    $('#wpTextbox1').wikiEditor('addToToolbar', {
      section: 'insert',
      groups: { code: { label: 'Code' } },
      tools: {
        codeblock: {
          label: 'Codeblock',
          type: 'button',
          icon: '//upload.wikimedia.org/wikipedia/commons/6/6a/OOjs_UI_icon_code.svg',
          action: {
            type: 'encapsulate',
            options: {
              pre: '<syntaxhighlight lang="csharp" line>\n',
              post: '\n</syntaxhighlight>'
            }
          }
        }
      }
    });
  });
});