Poznámka: Po zveřejnění musíte vyprázdnit cache vašeho prohlížeče, jinak změny neuvidíte.

  • Firefox / Safari: Při kliknutí na Aktualizovat držte Shift nebo stiskněte Ctrl-F5 nebo Ctrl-R (na Macu ⌘-R)
  • Google Chrome: Stiskněte Ctrl-Shift-R (na Macu ⌘-Shift-R)
  • Internet Explorer / Edge: Při kliknutí na Aktualizovat držte Ctrl nebo stiskněte Ctrl-F5
  • Opera: Stiskněte Ctrl-F5.
// <nowiki>

var customizeToolbar = function () {
        // Add section:
    $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'sections': {
                        'citations': {
                                'type': 'toolbar',
                                'label': 'Citace'
                        },
                        'hebrew': {
                                'type': 'toolbar',
                                'label': 'Hebrejské znaky'
                        }
                }
        } );

        // Add a group to an existing toolbar section:
    $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'citations',
			        'groups': {
                        'literature': {
                                'label': 'Literatura'
                        }
                }
        } );
    $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'hebrew',
			        'groups': {
                        'nikud': {
                                'label': 'Nikud'
                        }
                }
        } );
        // Add buttons to main.format:
	$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'main',
                'group': 'format',
		         'tools': {
						'language': {
								'label': 'Cizojazyčně',
								'type': 'button',
								'icon': 'http://upload.wikimedia.org/wikipedia/commons/b/b6/Vjazyce-button.png',
								'action': {
									'type': 'encapsulate',
									'options': {
										pre: "\x7b\x7bCizojazyčně||",
										post: "}}"
									}
								}
						},
						'langhe': {
								'label': 'Hebrejsky',
								'type': 'button',
								'icon': 'http://upload.wikimedia.org/wikipedia/commons/d/d2/Button_flagicon.png',
								'action': {
									'type': 'encapsulate',
									'options': {
										pre: "\x7b\x7bCizojazyčně|he|",
										post: "}}"
									}
								}
						},
						'poem': {
								'label': 'Poem',
								'type': 'button',
								'icon': 'https://upload.wikimedia.org/wikipedia/commons/c/cd/Button_poem.png',
								'action': {
									'type': 'encapsulate',
									'options': {
										pre: "<poem>\n",
										post: "\n</poem>\n"
									}
								}
						},
						'letterspace': {
								'label': 'Prostrkaně',
								'type': 'button',
								'icon': 'https://upload.wikimedia.org/wikipedia/commons/7/76/Button_ela_geminada_min.png',
								'action': {
									'type': 'encapsulate',
									'options': {
										pre: "\x7b\x7bProstrkaně|",
										post: "}}"
									}
								}
						}
                }
        } );
        // Add buttons to main.format:
        $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'main',
                'group': 'insert',
				'tools': {
						'quotecs': {
                                label: 'Quotation marks',
                                type: 'button',
                                icon: 'http://upload.wikimedia.org/wikipedia/commons/2/2f/Toolbaricon_quote_1.png',
                                action: {
                                      type: 'encapsulate',
                                        options: {
                                                'pre': "„",
                                                'post': "“"
                                        }
                                }
						},
						'quotecs-single': {
                                label: 'Single quotation marks',
                                type: 'button',
                                icon: 'https://upload.wikimedia.org/wikipedia/commons/0/07/Cquote2_single_black.svg',
                                action: {
                                        type: 'encapsulate',
                                        options: {
                                                'pre': "‚",
                                                'post': "‘"
                                        }
								}
						},
						'quotegi': {
                                label: 'Guillemets inverted',
                                type: 'button',
                                icon: 'https://upload.wikimedia.org/wikipedia/commons/a/a2/Vector_toolbar_guillemets_button_inverted.png',
                                action: {
                                        type: 'encapsulate',
                                        options: {
                                                'pre': "&#32;»",
                                                'post': "«&#32;"
                                        }
								}
						},
						'supe': {
                                label: 'Superscript e',
                                type: 'button',
                                icon: 'https://upload.wikimedia.org/wikipedia/commons/6/6e/Toolbaricon_regular_e.png',
                                action: {
                                        type: 'encapsulate',
                                        options: {
                                                'pre': "ᵉ",
                                        }
                                }
						},
						'navigation': {
								'label': 'Navigation',
								'type': 'button',
								'icon': 'https://upload.wikimedia.org/wikipedia/commons/9/9f/Button_tab.png',
								'action': {
									'type': 'encapsulate',
									'options': {
										pre: "{{NavigacePaP\n|TITUL=\x7b\x7bsubst:ROOTPAGENAME}}\n|AUTOR=",
										post: "\n|PŘEDCHOZÍ=\n|ČÁST=\x7b\x7bsubst:SUBPAGENAME}}\n|DALŠÍ=\n}}\n"
									}
								}
						},
						'pages': {
								'label': 'Pages',
								'type': 'button',
								'icon': 'https://upload.wikimedia.org/wikipedia/commons/7/79/Button_pages.svg',
								'action': {
									'type': 'encapsulate',
									'options': {
										pre: '<pages index="',
										post: '" include= onlysection= />\n'
									}
								}
						},
						'score': {
								'label': 'score',
								'type': 'button',
								'icon': 'https://upload.wikimedia.org/wikipedia/commons/b/b1/Button_Music_Note.png',
								'action': {
									'type': 'encapsulate',
									'options': {
										pre: '<score>',
										post: '</score>\n'
									}
								}
						}
                }
        } );
        $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'proofreadpage-tools',
                'group': 'other',
                'tools': {
                        'sectionbegin': {
                                label: 'Section begin',
								filters: [ 'body.ns-250' ],
                                type: 'button',
                                icon: 'https://upload.wikimedia.org/wikipedia/commons/3/37/Button_Overline.png',
                                action: {
                                        type: 'encapsulate',
                                        options: {
                                                'pre': '<section begin="',
                                                'post': '" />'
                                        }
                                }
                        },
                        'sectionend': {
                                label: 'Section end',
								filters: [ 'body.ns-250' ],
                                type: 'button',
                                icon: 'https://upload.wikimedia.org/wikipedia/commons/9/94/Toolbaricon_regular_S_underline.png',
                                action: {
                                        type: 'encapsulate',
                                        options: {
                                                'pre': '<section end="',
                                                'post': '" />'
                                        }
                                }
                        }
                }
        } );
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'citations',
			'group': 'literature',
			'tools':	 {
				'citbible': {
					'label': 'Citát bible',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/5/5f/Button_bib.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "\x7b\x7bCitát bible|",
							post: "||||}}"
						}
					}
				},
				'ref': {
					'label': 'Reference',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/8/81/Wikieditor-reference.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "<ref>",
							post: "</ref>"
						}
					}
				},
				'refname': {
					'label': 'Opakovaná reference',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/1/19/Wikieditor-reference-2.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "<ref name=\"",
							post: "\"/>"
						}
					}
				},
				'reffollow': {
					'label': 'Pokračování reference',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/3/34/Toolbar_references.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "<ref follow=\"\">",
							post: "\n</ref>"
						}
					}
				}
			}
        } );
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'hebrew',
			'group': 'nikud',
			'tools':	 {
				'shva': {
					'label': 'Šva',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/4/4f/Nikud12.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ְ"
						}
					}
				},
				'chataf-segol': {
					'label': 'Chataf segol',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/6/61/Nikud11.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ֱ",
						}
					}
				},
				'chataf-patach': {
					'label': 'Chataf patach',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/5/59/Nikud10.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ֲ",
						}
					}
				},
				'chataf-kamac': {
					'label': 'Chataf kamac',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/d/d5/Nikud9.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ֳ",
						}
					}
				},
				'chirik': {
					'label': 'Chirik',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/e/e3/Nikud8.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ִ",
						}
					}
				},
				'cere': {
					'label': 'Cere',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/3/31/Nikud7.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ֵ",
						}
					}
				},
				'segol': {
					'label': 'Segol',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/1/10/Nikud6.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ֶ",
						}
					}
				},
				'patach': {
					'label': 'Patach',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/a/af/Nikud4.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ַ",
						}
					}
				},
				'kamac': {
					'label': 'Kamac',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/7/7f/Nikud5.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ָ",
						}
					}
				},
				'sin': {
					'label': 'Sin',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/9/9a/Nikud15.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ׂ",
						}
					}
				},
				'shin': {
					'label': 'Shin',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/b/b7/Nikud14.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ׁ",
						}
					}
				},
				'cholam': {
					'label': 'Cholam',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/2/2d/Nikud2.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ֹ",
						}
					}
				},
				'dagesh': {
					'label': 'Dagesh',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/5/5b/Nikud1.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ּ",
						}
					}
				},
				'kubuc': {
					'label': 'Kubuc',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/c/c5/Nikud13.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ֻ",
						}
					}
				},
				'kamac katan': {
					'label': 'Kamac katan',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/d/db/Births.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "\u05c7",
						}
					}
				},
				'meteg': {
					'label': 'Meteg',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/3/3d/IPA-stress.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "\u05bd",
						}
					}
				},
				'rafe': {
					'label': 'Rafe',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/5/58/Button_o_with_macron.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "ֿ",
						}
					}
				}
			}
		} );
};

/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
if ( $.inArray( mw.config.get( 'wgAction' ), [ 'edit', 'submit' ] ) !== -1 ) {
	mw.loader.using( 'user.options' ).then( function () {
		// This can be the string "0" if the user disabled the preference ([[phab:T54542#555387]])
		if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
			$.when(
				mw.loader.using( 'ext.wikiEditor' ), $.ready
			).then( customizeToolbar );
		}
	} );
}

// </nowiki>