User:Cactus.man/Scripts/ExtraEditButtons.js
// <pre><nowiki>
//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Add additional editing buttons to the edit window dialog
// this is based on the original code on Wikipedia:Tools/Editing tools
// adapted from (http://en.wikipedia.org/wiki/User:MarkS/extraeditbuttons.js)
//////////////////////////////////////////////////////////////////////////////////////////////////////////
function InsertButtonsToToolBar()
{
if(typeof mwCustomEditButtons === 'undefined') return;
//Code button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/2/23/Button_code.png",
"speedTip": "Insert code",
"tagOpen": "<code>",
"tagClose": "</code>",
"sampleText": "Code"}
//Gallery button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/12/Button_gallery.png",
"speedTip": "Insert a picture gallery",
"tagOpen": "\n<gallery>\n",
"tagClose": "\n</gallery>",
"sampleText": "Image:FileName.jpg|Caption1"}
//Coloured text button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/1/1e/Button_font_color.png",
"speedTip": "Insert colored text",
"tagOpen": "<span style='color: ColorName'>",
"tagClose": "</span>",
"sampleText": "Span of text"}
//Definition list button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/d/d3/Button_definition_list.png",
"speedTip": "Insert definition list",
"tagOpen": "\n; ",
"tagClose": " : ",
"sampleText": "Insert text"}
//Table button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/en/6/60/Button_insert_table.png",
"speedTip": "Simple table",
"tagOpen": "\n{| border='1' \n|- \n| 1 || 2\n|- \n| 3 || 4",
"tagClose": "\n|}\n",
"sampleText": ""}
//Template button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/3/3b/Button_template_alt.png",
"speedTip": "Template",
"tagOpen": "{{",
"tagClose": "}}",
"sampleText": "Template name"}
//Category button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/5/5a/Button_category_alt.png",
"speedTip": "Category",
"tagOpen": "[[Category:",
"tagClose": "]]",
"sampleText": "Category title"}
//Reference link button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/7/79/Button_reflink.png",
"speedTip": "<ref>",
"tagOpen": "<ref>",
"tagClose": "</ref>",
"sampleText": "Insert reference material"}
//Reference button
mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://upload.wikimedia.org/wikipedia/commons/a/a0/Button_references_alt.png",
"speedTip": "Reference footer",
"tagOpen": "<references/>",
"tagClose": "",
"sampleText": ""}
}
/////////////////////////////////////////////////////////////////////////////////////
//Strike out button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/c/c9/Button_strike.png",
// "speedTip": "Strike",
// "tagOpen": "<s>",
// "tagClose": "</s>",
// "sampleText": "Strike-through text"}
//Small text button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/5/58/Button_small.png",
// "speedTip": "Small",
// "tagOpen": "<small>",
// "tagClose": "</small>",
// "sampleText": "Small Text"}
//Left text button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/e/ea/Button_align_left.png",
// "speedTip": "Left-Align",
// "tagOpen": "<div style='text-align: left; direction: ltr; margin-left: 1em;'>\n",
// "tagClose": "\n</div>",
// "sampleText": "Left-aligned text"}
//Centre text button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/5/5f/Button_center.png",
// "speedTip": "Center",
// "tagOpen": "<div style='text-align: center;'>\n",
// "tagClose": "\n</div>",
// "sampleText": "Centered text"}
//Line break button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/1/13/Button_enter.png",
// "speedTip": "Line break",
// "tagOpen": "<br />",
// "tagClose": "",
// "sampleText": ""}
//Superscript button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/8/80/Button_upper_letter.png",
// "speedTip": "Superscript",
// "tagOpen": "<sup>",
// "tagClose": "</sup>",
// "sampleText": "Superscript text"}
//Subscript button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/7/70/Button_lower_letter.png",
// "speedTip": "Subscript",
// "tagOpen": "<sub>",
// "tagClose": "</sub>",
// "sampleText": "Subscript text"}
//Comment button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/3/34/Button_hide_comment.png",
// "speedTip": "Insert hidden Comment",
// "tagOpen": "<!-- ",
// "tagClose": " -->",
// "sampleText": "Comment"}
//Block Quote button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png",
// "speedTip": "Insert block of quoted text",
//// "tagOpen": "<blockquote style='border: 1px solid blue; padding: 2em;'>\n",
// "tagOpen": "<blockquote>\n",
// "tagClose": "\n</blockquote>",
// "sampleText": "Block quote"}
//Insert tab button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/8/8e/Button_shifting.png",
// "speedTip": "Insert tab(s)",
// "tagOpen": ":",
// "tagClose": "",
// "sampleText": ":"}
//Secondary headline button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/e/e9/Button_headline2.png",
// "speedTip": "Secondary headline",
// "tagOpen": "\n===",
// "tagClose": "===",
// "sampleText": "Secondary headline"}
//Sub link button
//mwCustomEditButtons[mwCustomEditButtons.length] = {
// "imageFile": "http://upload.wikimedia.org/wikipedia/en/9/93/Button_sub_link.png",
// "speedTip": "Insert link to sub-page",
// "tagOpen": "[[Page#",
// "tagClose": "]]",
// "sampleText": "Sub_page"}
/////////////////////////////////////////////////////////////////////////////////////////////
$( InsertButtonsToToolBar );
// </nowiki></pre>
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.