跳转到内容

User:Shizhao/Edittools-vector.js

维基百科,自由的百科全书

这是本页的一个历史版本,由Shizhao留言 | 贡献2010年7月2日 (五) 09:24 User:Shizhao/vector.js移动到User:Shizhao/Edittools-vector.js编辑。这可能和当前版本存在着巨大的差异。

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'main',
			'group': 'insert',
			'tools': {
				'category': {
					label: '分类',
					type: 'button',
					icon: '/media/wikipedia/commons/thumb/0/00/Structure_du_site_ic%C3%B4ne.svg/23px-Structure_du_site_ic%C3%B4ne.svg.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "[[Category:",
							post: "]]"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'strikethrough': {
					label: '删除线',
					type: 'button',
					icon: '/media/wikipedia/commons/thumb/4/45/Gnome-format-text-strikethrough.svg/22px-Gnome-format-text-strikethrough.svg.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<s>",
							post: "</s>"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'underline': {
					label: '下划线',
					type: 'button',
					icon: '/media/wikipedia/commons/thumb/9/99/Gnome-format-text-underline.svg/22px-Gnome-format-text-underline.svg.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<u>",
							post: "</u>"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'quote': {
					label: '块引用',
					type: 'button',
					icon: '/media/wikipedia/commons/4/4e/Toolbaricon_quote.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<blockquote>",
							post: "</blockquote>"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'justify-left': {
					label: '左对齐',
					type: 'button',
					icon: '/media/wikipedia/commons/thumb/2/28/Gnome-format-justify-left.svg/23px-Gnome-format-justify-left.svg.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<div style=\"text-align: left;\">",
							post: "</div>"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'justify-center': {
					label: '居中',
					type: 'button',
					icon: '/media/wikipedia/commons/thumb/c/ce/Gnome-format-justify-center.svg/23px-Gnome-format-justify-center.svg.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<div style=\"text-align: center;\">",
							post: "</div>"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'justify-right': {
					label: '右对齐',
					type: 'button',
					icon: '/media/wikipedia/commons/thumb/f/fb/Gnome-format-justify-right.svg/23px-Gnome-format-justify-right.svg.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<div style=\"text-align: right;\">",
							post: "</div>"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'indent-more': {
					label: '缩进',
					type: 'button',
					icon: '/media/wikipedia/commons/thumb/8/84/Gnome-format-indent-more.svg/23px-Gnome-format-indent-more.svg.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: ":",
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'insert',
			'tools': {
				'math': {
					label: '数学公式',
					type: 'button',
					icon: '/media/wikipedia/commons/1/1c/Toolbaricon_math.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<math>",
							post: "</math>"
						}
					}
				}
			}
		} );
	} );
}
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'insert',
			'tools': {
				'template': {
					label: '模板',
					type: 'button',
					icon: '/media/wikipedia/commons/8/86/Wikieditor-template.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "{{",
							post: "}}"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'insert',
			'tools': {
				'hidden': {
					label: '注释或隐藏文字',
					type: 'button',
					icon: '/media/wikipedia/commons/e/e7/Toolbaricon_hidden.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<!-- ",
							post: " -->"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'insert',
			'tools': {
				'hline': {
					label: '水平线',
					type: 'button',
					icon: '/media/wikipedia/commons/b/b4/Toolbaricon_rule.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "----",
							ownline: true
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'insert',
			'tools': {
				'hans-hant': {
					label: '繁简转换',
					type: 'button',
					icon: '/media/wikipedia/commons/9/9d/Toolbaricon_sr.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "-{",
							post: "}-"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'insert',
			'tools': {
				'mediafile': {
					label: '媒体文件链接',
					type: 'button',
					icon: '/media/wikipedia/commons/6/65/Toolbaricon_media.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "[[Media:",
                                                        periMsg: 'Example.ogg', 
							post: "]]"
						}
					}
				}
			}
		} );
	} );
}

if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'insert',
			'tools': {
				'references': {
					label: '参考文献区',
					type: 'button',
					icon: '/media/wikipedia/commons/8/8d/Wikieditor-references.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "\n==参考文献==\n<div class=\"references-small\">\n<references></references>\n</div>\n",
						}
					}
				}
			}
		} );
	} );
}