Difference between revisions of "MediaWiki:Common.js"

From AGI Wiki
Jump to navigationJump to search
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
/* Any JavaScript here will be loaded for all users on every page load. */
 
/* Any JavaScript here will be loaded for all users on every page load. */
  
 +
// Underscore
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
Underscore: {
 +
                label: 'Underscore',
 +
type: 'button',
 +
icon: '/buttons/FormatUnderscore.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<u>',
 +
post: '</u>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Wikipedia Link
+
// Strikethrough
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-myspecialbutton',
+
section: 'advanced',
        imageFile: '/buttons/WP.png',
+
group: 'format',
        speedTip: "Wikipedia Link",
+
tools: {
        tagOpen: "[[w:|",
+
Strikethrough: {
        tagClose: "]]",
+
                label: 'Strikethrough',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/FormatStrike.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<strike>',
 +
post: '</strike>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Underscore
+
// Align Left
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-myspecialbutton',
+
section: 'advanced',
        imageFile: '/buttons/FormatUnderscore.png',
+
group: 'format',
        speedTip: "Underscore",
+
tools: {
        tagOpen: "<u>",
+
AlignLeft: {
        tagClose: "</u>",
+
                label: 'Align Left',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/AlignLeft.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div align=\"left\">',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Strikethrough
+
// Align Center
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-myspecialbutton',
+
section: 'advanced',
        imageFile: '/buttons/formatStrike.png',
+
group: 'format',
        speedTip: "Strikethrough",
+
tools: {
        tagOpen: "<strike>",
+
AlignCenter: {
        tagClose: "</strike>",
+
                label: 'Align Center',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/AlignCenter.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div align=\"center\">',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Alert
+
// Align Right
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'Alert',
+
section: 'advanced',
        imageFile: '/buttons/red.png',
+
group: 'format',
        speedTip: "Alert",
+
tools: {
        tagOpen: "<span class=\"Alert\">",
+
AlignRight: {
        tagClose: "</span>",
+
                label: 'Align Right',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/AlignRight.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div align=\"right\">',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Inactive
+
// Justify
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'Inactive',
+
section: 'advanced',
        imageFile: '/buttons/gray.png',
+
group: 'format',
        speedTip: "Inactive",
+
tools: {
        tagOpen: "<span class=\"Inactive\">",
+
Justify: {
        tagClose: "</span>",
+
                label: 'Justify',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/AlignJustify.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div align=\"justify\">',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Comment
+
// Indent
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-myspecialbutton',
+
section: 'advanced',
        imageFile: '/buttons/comment.png',
+
group: 'format',
        speedTip: "Comment",
+
tools: {
        tagOpen: "<!-- ",
+
Indent: {
        tagClose: " -->",
+
                label: 'Indent',
        sampleText: "Insert comment here"
+
type: 'button',
});
+
icon: '/buttons/Indent.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<blockquote>',
 +
post: '</blockquote>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Block Quote
+
// Offset
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'blockquote',
+
section: 'advanced',
        imageFile: '/buttons/blockquote.png',
+
group: 'format',
        speedTip: "Blockquote",
+
tools: {
        tagOpen: "<blockquote>",
+
Offset: {
        tagClose: "</blockquote>",
+
                label: 'Offset',
        sampleText: "Insert comment here"
+
type: 'button',
});
+
icon: '/buttons/Offset.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<blockquote class=\"offset\">',
 +
post: '</blockquote>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Non-breaking space
+
// Quote
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'nobreak',
+
section: 'advanced',
        imageFile: '/buttons/nobreak.png',
+
group: 'format',
        speedTip: "Non-breaking Space",
+
tools: {
        tagOpen: "&nbsp;",
+
Quote: {
        tagClose: "",
+
                label: 'Quote',
        sampleText: ""
+
type: 'button',
});
+
icon: 'http://wiki.sierrahelp.com/buttons/Quote.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div class=\"Quote\">\n{{Quote|Attrib = \n}}\n',
 +
post: '\n</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Line Break
+
// Alert
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-myspecialbutton',
+
section: 'advanced',
        imageFile: '/buttons/br.png',
+
group: 'format',
        speedTip: "New Line",
+
tools: {
        tagOpen: "",
+
Alert: {
        tagClose: "<br />\n",
+
                label: 'Alert',
        sampleText: ""
+
type: 'button',
});
+
icon: '/buttons/Red.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<span class=\"Alert\">',
 +
post: '</span>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
 +
// Inactive
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
Inactive: {
 +
                label: 'Inactive',
 +
type: 'button',
 +
icon: '/buttons/Gray.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<span class=\"Inactive\">',
 +
post: '</span>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Table
+
// Add Reference
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: '',
+
section: 'advanced',
        imageFile: '/buttons/table.png',
+
group: 'format',
        speedTip: "Table",
+
tools: {
        tagOpen: "{| cellpadding=\"10\" align=\"center\" width=\"85%\"\n|- \n|align=\"center\"| ",
+
Reference: {
        tagClose: "\n|}",
+
                label: 'Add Reference',
        sampleText: "Insert content here"
+
type: 'button',
});
+
icon: '/buttons/Reference.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<ref>',
 +
post: '</ref>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
 +
// Add Citation Required Notice
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
CitationWarning: {
 +
                label: 'Add Reference',
 +
type: 'button',
 +
icon: '/buttons/CitationWarning.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '{{CitationReq}}',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Align Left
+
// Wikipedia Link
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: '',
+
section: 'advanced',
        imageFile: '/buttons/alignLeft.png',
+
group: 'format',
        speedTip: "Align Left",
+
tools: {
        tagOpen: "<div align=\"left\">",
+
xxx: {
        tagClose: "</div>",
+
                label: 'Wikipedia',
        sampleText: "content here"
+
type: 'button',
});
+
icon: '/buttons/Wikipedia.png',
  
// Align Center
 
mw.toolbar.addButton({
 
        imageId: '',
 
        imageFile: '/buttons/alignCenter.png',
 
        speedTip: "Align Center",
 
        tagOpen: "<div align=\"center\">",
 
        tagClose: "</div>",
 
        sampleText: "content here"
 
});
 
  
// Align Right
+
                label: 'Wikipedia Link',
mw.toolbar.addButton({
+
action: {
        imageId: '',
+
type: 'encapsulate',
        imageFile: '/buttons/alignRight.png',
+
options: {
        speedTip: "Align Right",
+
pre: '[[w:|',
        tagOpen: "<div align=\"right\">",
+
post: ']]'
        tagClose: "</div>",
+
}
        sampleText: "content here"
+
}
});
+
}
 +
}
 +
} );
  
// Justify
+
// Redirect
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'justify',
+
section: 'advanced',
        imageFile: '/buttons/alignJustify.png',
+
group: 'format',
        speedTip: "Justify",
+
tools: {
        tagOpen: "<div align=\"justify\">",
+
Redirect: {
        tagClose: "</div>",
+
                label: 'Redirect',
        sampleText: ""
+
type: 'button',
});
+
icon: '/buttons/Redirect.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '#REDIRECT [[',
 +
post: ']]'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// AGI Code
+
// Superscript
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'AGI',
+
section: 'advanced',
        imageFile: '/buttons/AGI.png',
+
group: 'format',
        speedTip: "AGI Code",
+
tools: {
        tagOpen: "<div class=\"CodeBlockHeader\">Code:</div>\n<syntaxhighlight lang=\"agi\">\n",
+
Superscript: {
        tagClose: "</syntaxhighlight>",
+
                label: 'Superscript',
        sampleText: "code here"
+
type: 'button',
});
+
icon: '/buttons/Superscript.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<sup>',
 +
post: '</sup>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Code
+
// Subscript
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'code',
+
section: 'advanced',
        imageFile: '/buttons/code.png',
+
group: 'format',
        speedTip: "Code",
+
tools: {
        tagOpen: "<code>",
+
Subscript: {
        tagClose: "</code>",
+
                label: 'Subscript',
        sampleText: "code here"
+
type: 'button',
});
+
icon: '/buttons/Subscript.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<sub>',
 +
post: '</sub>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Preformatted
+
// Half
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'pre',
+
section: 'advanced',
        imageFile: '/buttons/pre.png',
+
group: 'format',
        speedTip: "Preformatted",
+
tools: {
        tagOpen: "<pre>",
+
Half: {
        tagClose: "</pre>",
+
                label: 'Half',
        sampleText: "code here"
+
type: 'button',
});
+
icon: '/buttons/Half.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '½',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Redirect
+
// Quarter
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'Redirect',
+
section: 'advanced',
        imageFile: '/buttons/redirect.png',
+
group: 'format',
        speedTip: "Redirect",
+
tools: {
        tagOpen: "#REDIRECT [[",
+
Quarter: {
        tagClose: "]]",
+
                label: 'Quarter',
        sampleText: "code here"
+
type: 'button',
});
+
icon: '/buttons/Quarter.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '¼',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// Copyright
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
Copyright: {
 +
                label: 'Copyright',
 +
type: 'button',
 +
icon: '/buttons/Copyright.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '©',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// Comment
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
Comment: {
 +
 +
                label: 'Comment',
 +
type: 'button',
 +
icon: '/buttons/Comment.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<!-- ',
 +
post: ' -->'
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// Non-breaking space
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
NoBreak: {
 +
                label: 'Non-breaking Space',
 +
type: 'button',
 +
icon: '/buttons/NoBreak.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '&nbsp;',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// New Line
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
NewLine: {
 +
                label: 'New Line',
 +
type: 'button',
 +
icon: '/buttons/NewLine.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '',
 +
post: '<br />\n'
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// Table
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
Table: {
 +
                label: 'Table',
 +
type: 'button',
 +
icon: '/buttons/Table.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '{| cellpadding=\"10\" align=\"center\" width=\"85%\"\n|- \n|align=\"center\"| ',
 +
post: '\n|}'
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// Add template
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
NewTemplate: {
 +
                label: 'Add template',
 +
type: 'button',
 +
icon: '/buttons/Template.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '{{',
 +
post: '}}'
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 +
// AGI Code
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
AGICode: {
 +
                label: 'AGI Code',
 +
type: 'button',
 +
icon: '/buttons/AGI.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div class=\"CodeBlockHeader\">AGI Code:</div>\n<syntaxhighlight lang=\"agi\">\n',
 +
post: '</syntaxhighlight>'
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// SCI Code
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
scicode: {
 +
                label: 'SCI Code',
 +
type: 'button',
 +
icon: '/buttons/SCI.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div class=\"CodeBlockHeader\">SCI Code:</div>\n<syntaxhighlight lang=\"sci\">\n',
 +
post: '</syntaxhighlight>'
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// Code
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
Code: {
 +
                label: 'Code',
 +
type: 'button',
 +
icon: '/buttons/code.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<code>',
 +
post: '</code>'
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// Preformatted
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
Pre: {
 +
                label: 'Preformatted',
 +
type: 'button',
 +
icon: '/buttons/pre.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<pre>',
 +
post: '</pre>'
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
 
 +
// Clear
 +
$textarea.wikiEditor( 'addToToolbar', {
 +
section: 'advanced',
 +
group: 'format',
 +
tools: {
 +
Clear: {
 +
                label: 'Clear',
 +
type: 'button',
 +
icon: '/buttons/Clear.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div>',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );

Latest revision as of 23:06, 2 February 2023


/* Any JavaScript here will be loaded for all users on every page load. */

	// Underscore
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Underscore: {
                label: 'Underscore',
				type: 'button',
				icon: '/buttons/FormatUnderscore.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<u>',
						post: '</u>'
					}
				}
			}
		}
	} );

	// Strikethrough
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Strikethrough: {
                label: 'Strikethrough',
				type: 'button',
				icon: '/buttons/FormatStrike.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<strike>',
						post: '</strike>'
					}
				}
			}
		}
	} );

	// Align Left
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			AlignLeft: {
                label: 'Align Left',
				type: 'button',
				icon: '/buttons/AlignLeft.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<div align=\"left\">',
						post: '</div>'
					}
				}
			}
		}
	} );

	// Align Center
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			AlignCenter: {
                label: 'Align Center',
				type: 'button',
				icon: '/buttons/AlignCenter.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<div align=\"center\">',
						post: '</div>'
					}
				}
			}
		}
	} );

	// Align Right
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			AlignRight: {
                label: 'Align Right',
				type: 'button',
				icon: '/buttons/AlignRight.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<div align=\"right\">',
						post: '</div>'
					}
				}
			}
		}
	} );

	// Justify
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Justify: {
                label: 'Justify',
				type: 'button',
				icon: '/buttons/AlignJustify.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<div align=\"justify\">',
						post: '</div>'
					}
				}
			}
		}
	} );

	// Indent
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Indent: {
                label: 'Indent',
				type: 'button',
				icon: '/buttons/Indent.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<blockquote>',
						post: '</blockquote>'
					}
				}
			}
		}
	} );

	// Offset
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Offset: {
                label: 'Offset',
				type: 'button',
				icon: '/buttons/Offset.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<blockquote class=\"offset\">',
						post: '</blockquote>'
					}
				}
			}
		}
	} );

	// Quote
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Quote: {
                label: 'Quote',
				type: 'button',
				icon: 'http://wiki.sierrahelp.com/buttons/Quote.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<div class=\"Quote\">\n{{Quote|Attrib = \n}}\n',
						post: '\n</div>'
					}
				}
			}
		}
	} );

	// Alert
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Alert: {
                label: 'Alert',
				type: 'button',
				icon: '/buttons/Red.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<span class=\"Alert\">',
						post: '</span>'
					}
				}
			}
		}
	} );

	// Inactive
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Inactive: {
                label: 'Inactive',
				type: 'button',
				icon: '/buttons/Gray.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<span class=\"Inactive\">',
						post: '</span>'
					}
				}
			}
		}
	} );

	// Add Reference
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Reference: {
                label: 'Add Reference',
				type: 'button',
				icon: '/buttons/Reference.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<ref>',
						post: '</ref>'
					}
				}
			}
		}
	} );

	// Add Citation Required Notice
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			CitationWarning: {
                label: 'Add Reference',
				type: 'button',
				icon: '/buttons/CitationWarning.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '{{CitationReq}}',
						post: ''
					}
				}
			}
		}
	} );

	// Wikipedia Link
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			xxx: {
                label: 'Wikipedia',
				type: 'button',
				icon: '/buttons/Wikipedia.png',


                label: 'Wikipedia Link',
				action: {
					type: 'encapsulate',
					options: {
						pre: '[[w:|',
						post: ']]'
					}
				}
			}
		}
	} );

	// Redirect
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Redirect: {
                label: 'Redirect',
				type: 'button',
				icon: '/buttons/Redirect.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '#REDIRECT [[',
						post: ']]'
					}
				}
			}
		}
	} );

	// Superscript
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Superscript: {
                label: 'Superscript',
				type: 'button',
				icon: '/buttons/Superscript.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<sup>',
						post: '</sup>'
					}
				}
			}
		}
	} );

	// Subscript
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Subscript: {
                label: 'Subscript',
				type: 'button',
				icon: '/buttons/Subscript.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<sub>',
						post: '</sub>'
					}
				}
			}
		}
	} );

	// Half
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Half: {
                label: 'Half',
				type: 'button',
				icon: '/buttons/Half.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '½',
						post: ''
					}
				}
			}
		}
	} );

	// Quarter
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Quarter: {
                label: 'Quarter',
				type: 'button',
				icon: '/buttons/Quarter.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '¼',
						post: ''
					}
				}
			}
		}
	} );

	// Copyright
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Copyright: {
                label: 'Copyright',
				type: 'button',
				icon: '/buttons/Copyright.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '©',
						post: ''
					}
				}
			}
		}
	} );

	// Comment
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Comment: {
		
                label: 'Comment',
				type: 'button',
				icon: '/buttons/Comment.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<!-- ',
						post: ' -->'
					}
				}
			}
		}
	} );

	// Non-breaking space
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			NoBreak: {
                label: 'Non-breaking Space',
				type: 'button',
				icon: '/buttons/NoBreak.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '&nbsp;',
						post: ''
					}
				}
			}
		}
	} );

	// New Line
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			NewLine: {
                label: 'New Line',
				type: 'button',
				icon: '/buttons/NewLine.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '',
						post: '<br />\n'
					}
				}
			}
		}
	} );

	// Table
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Table: {
                label: 'Table',
				type: 'button',
				icon: '/buttons/Table.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '{| cellpadding=\"10\" align=\"center\" width=\"85%\"\n|- \n|align=\"center\"| ',
						post: '\n|}'
					}
				}
			}
		}
	} );

	// Add template
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			NewTemplate: {
                label: 'Add template',
				type: 'button',
				icon: '/buttons/Template.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '{{',
						post: '}}'
					}
				}
			}
		}
	} );
 
	// AGI Code
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			AGICode: {
                label: 'AGI Code',
				type: 'button',
				icon: '/buttons/AGI.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<div class=\"CodeBlockHeader\">AGI Code:</div>\n<syntaxhighlight lang=\"agi\">\n',
						post: '</syntaxhighlight>'
					}
				}
			}
		}
	} );

	// SCI Code
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			scicode: {
                label: 'SCI Code',
				type: 'button',
				icon: '/buttons/SCI.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<div class=\"CodeBlockHeader\">SCI Code:</div>\n<syntaxhighlight lang=\"sci\">\n',
						post: '</syntaxhighlight>'
					}
				}
			}
		}
	} );

	// Code
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Code: {
                label: 'Code',
				type: 'button',
				icon: '/buttons/code.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<code>',
						post: '</code>'
					}
				}
			}
		}
	} );

	// Preformatted
		$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Pre: {
                label: 'Preformatted',
				type: 'button',
				icon: '/buttons/pre.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<pre>',
						post: '</pre>'
					}
				}
			}
		}
	} );

	// Clear
	$textarea.wikiEditor( 'addToToolbar', {
			section: 'advanced',
			group: 'format',
			tools: {
			Clear: {
                label: 'Clear',
				type: 'button',
				icon: '/buttons/Clear.png',
				action: {
					type: 'encapsulate',
					options: {
						pre: '<div>',
						post: '</div>'
					}
				}
			}
		}
	} );