Difference between revisions of "User:King of Herdaz/Toolbar customization"

m
→‎Premade Elements: missed a dropdown
m (→‎Premade Elements: normalized whitespace for dropdowns and added firstborn)
m (→‎Premade Elements: missed a dropdown)
|
<pre>
//Add new references dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
groups: {
list: {
tools: {
references: {
label: 'referencesrefs',
type: 'select',
list: {
'book-ref': {
label: '{' + '{book ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{book ref|',
post: '}}'
}
}
},
'wob-ref': {
label: '{' + '{wob ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{wob ref|',
post: '}}'
}
}
},
'ref-plaintext': {
label: '{' + '{ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{ref|text=',
post: '}}'
}
}
},
'epigraph-ref': {
label: '{' + '{epigraph ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{epigraph ref|',
post: '}}'
}
}
},
'au-ref': {
label: '{' + '{au ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{au ref|',
post: '}}'
}
}
},
'msh-ref': {
label: '{' + '{msh ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{msh ref|',
post: '}}'
}
}
},
'tes-ref': {
label: '{' + '{tes ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{tes ref|',
post: '}}'
}
}
},
'file-ref': {
label: '{' + '{file ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{file ref|',
post: '}}'
}
}
},
'map-refmapref': {
label: '{' + '{map ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{map ref|',
post: '}}'
}
}
},
'url-ref': {
label: '{' + '{url ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{url ref|url=',
post: '|text=|date=|site=}}'
}
}
},
'17s-ref': {
label: '{' + '{17s ref}}',
action: {
type: 'encapsulate',
options: {
pre: '{' + '{17s ref|topic/news/post',
post: '|id#|description|date=}}'
}
}
}
}
}
}
}
}
} );
</pre>
|}
Autopatrolled, Editors
8,718

edits