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( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'advanced',
'groups': {
'more': {
}
}
} );
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
$j(document).ready( function() {
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'advanced',
'group': 'more',
'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': {
'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': 'format',
'tools': {
'template': {
label: '模板',
type: 'button',
icon: '/media/wikipedia/commons/thumb/f/fb/Template_icon.svg/22px-Template_icon.svg.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': 'format',
'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': 'format',
'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': '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': {
'hans-hant': {
label: '繁简转换',
type: 'button',
icon: '/media/wikipedia/commons/9/9d/Toolbaricon_sr.png',
action: {
type: 'encapsulate',
options: {
pre: "-{",
post: "}-"
}
}
}
}
} );
} );
}