Difference between revisions of "MediaWiki:Common.js"

From AGI Wiki
Jump to navigationJump to search
 
(2 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
+
// Underscore
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Underscore',
+
section: 'advanced',
        imageFile: '/buttons/FormatUnderscore.png',
+
group: 'format',
        speedTip: "Underscore",
+
tools: {
        tagOpen: "<u>",
+
Underscore: {
        tagClose: "</u>",
+
                label: 'Underscore',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/FormatUnderscore.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<u>',
 +
post: '</u>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Strikethrough
+
// Strikethrough
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Strikethrough',
+
section: 'advanced',
        imageFile: '/buttons/FormatStrike.png',
+
group: 'format',
        speedTip: "Strikethrough",
+
tools: {
        tagOpen: "<strike>",
+
Strikethrough: {
        tagClose: "</strike>",
+
                label: 'Strikethrough',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/FormatStrike.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<strike>',
 +
post: '</strike>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Align Left
+
// Align Left
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-AlignLeft',
+
section: 'advanced',
        imageFile: '/buttons/AlignLeft.png',
+
group: 'format',
        speedTip: "Align Left",
+
tools: {
        tagOpen: "<div align=\"left\">",
+
AlignLeft: {
        tagClose: "</div>",
+
                label: 'Align Left',
        sampleText: "content here"
+
type: 'button',
});
+
icon: '/buttons/AlignLeft.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div align=\"left\">',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Align Center
+
// Align Center
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-AlignCenter',
+
section: 'advanced',
        imageFile: '/buttons/AlignCenter.png',
+
group: 'format',
        speedTip: "Align Center",
+
tools: {
        tagOpen: "<div align=\"center\">",
+
AlignCenter: {
        tagClose: "</div>",
+
                label: 'Align Center',
        sampleText: "content here"
+
type: 'button',
});
+
icon: '/buttons/AlignCenter.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div align=\"center\">',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Align Right
+
// Align Right
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-AlignRight',
+
section: 'advanced',
        imageFile: '/buttons/AlignRight.png',
+
group: 'format',
        speedTip: "Align Right",
+
tools: {
        tagOpen: "<div align=\"right\">",
+
AlignRight: {
        tagClose: "</div>",
+
                label: 'Align Right',
        sampleText: "content here"
+
type: 'button',
});
+
icon: '/buttons/AlignRight.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div align=\"right\">',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Justify
+
// Justify
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Justify',
+
section: 'advanced',
        imageFile: '/buttons/AlignJustify.png',
+
group: 'format',
        speedTip: "Justify",
+
tools: {
        tagOpen: "<div align=\"justify\">",
+
Justify: {
        tagClose: "</div>",
+
                label: 'Justify',
        sampleText: ""
+
type: 'button',
});
+
icon: '/buttons/AlignJustify.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<div align=\"justify\">',
 +
post: '</div>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Indent
+
// Indent
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Indent',
+
section: 'advanced',
        imageFile: '/buttons/Indent.png',
+
group: 'format',
        speedTip: "Indent",
+
tools: {
        tagOpen: "<blockquote>",
+
Indent: {
        tagClose: "</blockquote>",
+
                label: 'Indent',
        sampleText: "Insert comment here"
+
type: 'button',
});
+
icon: '/buttons/Indent.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<blockquote>',
 +
post: '</blockquote>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Offset
+
// Offset
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Offset',
+
section: 'advanced',
        imageFile: '/buttons/Offset.png',
+
group: 'format',
        speedTip: "Offset",
+
tools: {
        tagOpen: "<blockquote class=\"offset\">",
+
Offset: {
        tagClose: "</blockquote>",
+
                label: 'Offset',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/Offset.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<blockquote class=\"offset\">',
 +
post: '</blockquote>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Quote
+
// Quote
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Quote',
+
section: 'advanced',
        imageFile: 'http://wiki.sierrahelp.com/buttons/Quote.png',
+
group: 'format',
        speedTip: "Quote",
+
tools: {
        tagOpen: "<div class=\"Quote\">\n{{Quote|Attrib = \n}}\n",
+
Quote: {
        tagClose: "\n</div>",
+
                label: 'Quote',
        sampleText: "Quoted text here"
+
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
+
// Alert
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Alert',
+
section: 'advanced',
        imageFile: '/buttons/Red.png',
+
group: 'format',
        speedTip: "Alert",
+
tools: {
        tagOpen: "<span class=\"Alert\">",
+
Alert: {
        tagClose: "</span>",
+
                label: 'Alert',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/Red.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<span class=\"Alert\">',
 +
post: '</span>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Inactive
+
// Inactive
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Inactive',
+
section: 'advanced',
        imageFile: '/buttons/Gray.png',
+
group: 'format',
        speedTip: "Inactive",
+
tools: {
        tagOpen: "<span class=\"Inactive\">",
+
Inactive: {
        tagClose: "</span>",
+
                label: 'Inactive',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/Gray.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<span class=\"Inactive\">',
 +
post: '</span>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Add Reference
+
// Add Reference
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Reference',
+
section: 'advanced',
        imageFile: '/buttons/Reference.png',
+
group: 'format',
        speedTip: "Add Reference",
+
tools: {
        tagOpen: "<ref>",
+
Reference: {
        tagClose: "</ref>",
+
                label: 'Add Reference',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/Reference.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<ref>',
 +
post: '</ref>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Add Citation Required Notice
+
// Add Citation Required Notice
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-CitationWarning',
+
section: 'advanced',
        imageFile: '/buttons/CitationWarning.png',
+
group: 'format',
        speedTip: "Add Reference",
+
tools: {
        tagOpen: "{{CitationReq}}"
+
CitationWarning: {
});
+
                label: 'Add Reference',
 +
type: 'button',
 +
icon: '/buttons/CitationWarning.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '{{CitationReq}}',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Wikipedia Link
+
// Wikipedia Link
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Wikipedia',
+
section: 'advanced',
        imageFile: '/buttons/Wikipedia.png',
+
group: 'format',
        speedTip: "Wikipedia Link",
+
tools: {
        tagOpen: "[[w:|",
+
xxx: {
        tagClose: "]]",
+
                label: 'Wikipedia',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/Wikipedia.png',
  
// Redirect
 
mw.toolbar.addButton({
 
        imageId: 'mw-customeditbutton-Redirect',
 
        imageFile: '/buttons/Redirect.png',
 
        speedTip: "Redirect",
 
        tagOpen: "#REDIRECT [[",
 
        tagClose: "]]",
 
        sampleText: "code here"
 
});
 
  
// Superscript
+
                label: 'Wikipedia Link',
mw.toolbar.addButton({
+
action: {
        imageId: 'mw-customeditbutton-Superscript',
+
type: 'encapsulate',
        imageFile: '/buttons/Superscript.png',
+
options: {
        speedTip: "Superscript",
+
pre: '[[w:|',
        tagOpen: "<sup>",
+
post: ']]'
        tagClose: "</sup>",
+
}
        sampleText: "Text here"
+
}
});
+
}
 +
}
 +
} );
  
// Subscript
+
// Redirect
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Subscript',
+
section: 'advanced',
        imageFile: '/buttons/Subscript.png',
+
group: 'format',
        speedTip: "Subscript",
+
tools: {
        tagOpen: "<sub>",
+
Redirect: {
        tagClose: "</sub>",
+
                label: 'Redirect',
        sampleText: "Text here"
+
type: 'button',
});
+
icon: '/buttons/Redirect.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '#REDIRECT [[',
 +
post: ']]'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Half
+
// Superscript
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Half',
+
section: 'advanced',
        imageFile: '/buttons/Half.png',
+
group: 'format',
        speedTip: "Half",
+
tools: {
        tagOpen: "½",
+
Superscript: {
        tagClose: "",
+
                label: 'Superscript',
        sampleText: ""
+
type: 'button',
});
+
icon: '/buttons/Superscript.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<sup>',
 +
post: '</sup>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Quarter
+
// Subscript
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Quarter',
+
section: 'advanced',
        imageFile: '/buttons/Quarter.png',
+
group: 'format',
        speedTip: "Quarter",
+
tools: {
        tagOpen: "¼",
+
Subscript: {
        tagClose: "",
+
                label: 'Subscript',
        sampleText: ""
+
type: 'button',
});
+
icon: '/buttons/Subscript.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<sub>',
 +
post: '</sub>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Copyright
+
// Half
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Copyright',
+
section: 'advanced',
        imageFile: '/buttons/Copyright.png',
+
group: 'format',
        speedTip: "Copyright",
+
tools: {
        tagOpen: "©",
+
Half: {
        tagClose: "",
+
                label: 'Half',
        sampleText: ""
+
type: 'button',
});
+
icon: '/buttons/Half.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '½',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Comment
+
// Quarter
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Comment',
+
section: 'advanced',
        imageFile: '/buttons/Comment.png',
+
group: 'format',
        speedTip: "Comment",
+
tools: {
        tagOpen: "<!-- ",
+
Quarter: {
        tagClose: " -->",
+
                label: 'Quarter',
        sampleText: "Insert comment here"
+
type: 'button',
});
+
icon: '/buttons/Quarter.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '¼',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Non-breaking space
+
// Copyright
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-NoBreak',
+
section: 'advanced',
        imageFile: '/buttons/NoBreak.png',
+
group: 'format',
        speedTip: "Non-breaking Space",
+
tools: {
        tagOpen: "&nbsp;",
+
Copyright: {
        tagClose: "",
+
                label: 'Copyright',
        sampleText: ""
+
type: 'button',
});
+
icon: '/buttons/Copyright.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '©',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// New Line
+
// Comment
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-NewLine',
+
section: 'advanced',
        imageFile: '/buttons/NewLine.png',
+
group: 'format',
        speedTip: "New Line",
+
tools: {
        tagOpen: "",
+
Comment: {
        tagClose: "<br />\n",
+
        sampleText: ""
+
                label: 'Comment',
});
+
type: 'button',
 +
icon: '/buttons/Comment.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<!-- ',
 +
post: ' -->'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Table
+
// Non-breaking space
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Table',
+
section: 'advanced',
        imageFile: '/buttons/Table.png',
+
group: 'format',
        speedTip: "Table",
+
tools: {
        tagOpen: "{| cellpadding=\"10\" align=\"center\" width=\"85%\"\n|- \n|align=\"center\"| ",
+
NoBreak: {
        tagClose: "\n|}",
+
                label: 'Non-breaking Space',
        sampleText: "Insert content here"
+
type: 'button',
});
+
icon: '/buttons/NoBreak.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '&nbsp;',
 +
post: ''
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Add template
+
// New Line
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-NewTemplate',
+
section: 'advanced',
        imageFile: '/buttons/Template.png',
+
group: 'format',
        speedTip: "Add template",
+
tools: {
        tagOpen: "{{",
+
NewLine: {
        tagClose: "}}",
+
                label: 'New Line',
        sampleText: "Template Name"
+
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
+
// AGI Code
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-AGI',
+
section: 'advanced',
        imageFile: '/buttons/AGI.png',
+
group: 'format',
        speedTip: "AGI Code",
+
tools: {
        tagOpen: "<div class=\"CodeBlockHeader\">AGI Code:</div>\n<syntaxhighlight lang=\"agi\">\n",
+
AGICode: {
        tagClose: "</syntaxhighlight>",
+
                label: 'AGI Code',
        sampleText: "code here"
+
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
+
// SCI Code
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-SCI',
+
section: 'advanced',
        imageFile: '/buttons/SCI.png',
+
group: 'format',
        speedTip: "SCI Code",
+
tools: {
        tagOpen: "<div class=\"CodeBlockHeader\">SCI Code:</div>\n<syntaxhighlight lang=\"sci\">\n",
+
scicode: {
        tagClose: "</syntaxhighlight>",
+
                label: 'SCI Code',
        sampleText: "code here"
+
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
+
// Code
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Code',
+
section: 'advanced',
        imageFile: '/buttons/code.png',
+
group: 'format',
        speedTip: "Code",
+
tools: {
        tagOpen: "<code>",
+
Code: {
        tagClose: "</code>",
+
                label: 'Code',
        sampleText: "code here"
+
type: 'button',
});
+
icon: '/buttons/code.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<code>',
 +
post: '</code>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Preformatted
+
// Preformatted
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Pre',
+
section: 'advanced',
        imageFile: '/buttons/pre.png',
+
group: 'format',
        speedTip: "Preformatted",
+
tools: {
        tagOpen: "<pre>",
+
Pre: {
        tagClose: "</pre>",
+
                label: 'Preformatted',
        sampleText: "code here"
+
type: 'button',
});
+
icon: '/buttons/pre.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: '<pre>',
 +
post: '</pre>'
 +
}
 +
}
 +
}
 +
}
 +
} );
  
// Clear
+
// Clear
mw.toolbar.addButton({
+
$textarea.wikiEditor( 'addToToolbar', {
        imageId: 'mw-customeditbutton-Clear',
+
section: 'advanced',
        imageFile: '/buttons/Clear.png',
+
group: 'format',
        speedTip: "Clear",
+
tools: {
        tagOpen: "<div>",
+
Clear: {
        tagClose: "</div>",
+
                label: 'Clear',
        sampleText: "Text here"
+
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>'
					}
				}
			}
		}
	} );