MediaWiki:Common.js: Porovnání verzí

Řádek 8: Řádek 8:
 
                 label: 'Comment visible only for editors',
 
                 label: 'Comment visible only for editors',
 
                 type: 'button',
 
                 type: 'button',
                icon: '//upload.wikimedia.org/wikipedia/commons/f/f9/Toolbaricon_regular_S_stroke.png',
 
 
                 action: {
 
                 action: {
 
                     type: 'encapsulate',
 
                     type: 'encapsulate',

Verze z 19. 12. 2013, 16:55

/* Zde uvedený JavaScript bude použit pro všechny uživatele při načtení každé stránky.  */
jQuery(document).ready(function ($) {
    $('#wpTextbox1').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: " -->"
                    }
                }
            }
        }
    });
});