MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K (enable) |
K (fix) |
||
Zeile 1: | Zeile 1: | ||
/* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. | /* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen. | ||
var button = { | var button = { | ||
"imageFile": "skins/common/images/button_image.png", //image to be shown on the button (may be a full URL too), 22x22 pixels | "imageFile": "skins/common/images/button_image.png", //image to be shown on the button (may be a full URL too), 22x22 pixels | ||
Zeile 7: | Zeile 7: | ||
"sampleText": "<?php\n\n?>" //the sample text to place inside the block | "sampleText": "<?php\n\n?>" //the sample text to place inside the block | ||
}; | }; | ||
mwCustomEditButtons.push(button); | mwCustomEditButtons.push(button);*/ | ||
jQuery(document).ready(function ($) { $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'advanced', group: 'format', tools: { buttonId: { label: 'Highlight SourceCode', type: 'button', icon: 'skins/common/images/button_image.png', action: { type: 'encapsulate', options: { pre: "<source lang=\"php\">", peri: "<?php\n\n?>", post: "</source>" } } } } });}); |
Version vom 18. Mai 2013, 02:06 Uhr
1 /* Jedes JavaScript hier wird für alle Benutzer für jede Seite geladen.
2 var button = {
3 "imageFile": "skins/common/images/button_image.png", //image to be shown on the button (may be a full URL too), 22x22 pixels
4 "speedTip": "Highlight SourceCode", //text shown in a tooltip when hovering the mouse over the button
5 "tagOpen": "<source lang=\"php\">", //the text to use to mark the beginning of the block
6 "tagClose": "</source>", //the text to use to mark the end of the block (if any)
7 "sampleText": "<?php\n\n?>" //the sample text to place inside the block
8 };
9 mwCustomEditButtons.push(button);*/
10
11 jQuery(document).ready(function ($) { $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'advanced', group: 'format', tools: { buttonId: { label: 'Highlight SourceCode', type: 'button', icon: 'skins/common/images/button_image.png', action: { type: 'encapsulate', options: { pre: "<source lang=\"php\">", peri: "<?php\n\n?>", post: "</source>" } } } } });});