User:Shizhao/Edittools-vector.js
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
// To add a group to an existing toolbar section:
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': '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",
}
}
}
}
} );
} );
}