Editing User:King of Herdaz/Toolbar customization

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 9: Line 9:
 
Changes you make to your [[Special:MyPage/common.js|common.js]] page only take effect after you save the page, so to check that the changes you have made worked you should save your [[Special:MyPage/common.js|common.js]] page and try to edit some other wiki page. If you see the default toolbar when you edit a page that means that your edits "broke" your toolbar. Consult the [[#General Guidelines|#general guidelines]] for help debugging your code.
 
Changes you make to your [[Special:MyPage/common.js|common.js]] page only take effect after you save the page, so to check that the changes you have made worked you should save your [[Special:MyPage/common.js|common.js]] page and try to edit some other wiki page. If you see the default toolbar when you edit a page that means that your edits "broke" your toolbar. Consult the [[#General Guidelines|#general guidelines]] for help debugging your code.
   
If the changes you made are not working, or if you would like assistance creating your own toolbar you can DM <code>kingofherdaz</code> on Discord for help.
+
If the changes you made are not working, or if you would like assistance creating your own you can DM <code>King of Herdaz#2300</code> on Discord for help.
   
 
== Basic ==
 
== Basic ==
Line 68: Line 68:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
code: {
+
"code": {
 
label: 'Art infobox',
 
label: 'Art infobox',
 
type: 'button',
 
type: 'button',
Line 99: Line 99:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
artistAttribution: {
+
"artist-attribution": {
 
label: 'Artist Attribution',
 
label: 'Artist Attribution',
 
type: 'button',
 
type: 'button',
Line 130: Line 130:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
artistPage: {
+
"artist-page": {
 
label: 'Artist Page',
 
label: 'Artist Page',
 
type: 'button',
 
type: 'button',
Line 160: Line 160:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
break: {
+
"break": {
 
label: 'Break tag',
 
label: 'Break tag',
 
type: 'button',
 
type: 'button',
Line 190: Line 190:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
category: {
+
"category": {
 
label: 'Category',
 
label: 'Category',
 
type: 'button',
 
type: 'button',
Line 221: Line 221:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
code: {
+
"code": {
 
label: 'Code',
 
label: 'Code',
 
type: 'button',
 
type: 'button',
Line 252: Line 252:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
columns: {
+
"columns": {
 
label: 'Columns',
 
label: 'Columns',
 
type: 'button',
 
type: 'button',
Line 283: Line 283:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
hidden: {
+
"hidden": {
 
label: 'Hidden text',
 
label: 'Hidden text',
 
type: 'button',
 
type: 'button',
Line 316: Line 316:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
image: {
+
"image": {
 
label: 'Image template',
 
label: 'Image template',
 
type: 'button',
 
type: 'button',
Line 347: Line 347:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
link: {
+
"link": {
 
label: 'Link',
 
label: 'Link',
 
type: 'button',
 
type: 'button',
Line 378: Line 378:
 
group: 'insert',
 
group: 'insert',
 
tools: {
 
tools: {
wikipedia: {
+
"wikipedia": {
 
label: 'Wikipedia',
 
label: 'Wikipedia',
 
type: 'button',
 
type: 'button',
Line 409: Line 409:
 
|
 
|
 
<pre>
 
<pre>
//Add new references dropdown to the "advanced" section
+
//Add new references dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
+
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
+
section: 'advanced',
groups: {
+
groups: {
list: {
+
list: {
tools: {
+
tools: {
references: {
+
references: {
label: 'refs',
+
label: 'references',
type: 'select',
+
type: 'select',
list: {
+
list: {
'book': {
+
'book-ref': {
label: '{' + '{book ref}}',
+
label: '{' + '{book ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{book ref|',
+
pre: '{' + '{book ref|',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'wob': {
+
'wob-ref': {
label: '{' + '{wob ref}}',
+
label: '{' + '{wob ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{wob ref|',
+
pre: '{' + '{wob ref|',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'ref': {
+
'ref-plaintext': {
label: '{' + '{ref}}',
+
label: '{' + '{ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{ref|text=',
+
pre: '{' + '{ref|text=',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'epigraph': {
+
'epigraph-ref': {
label: '{' + '{epigraph ref}}',
+
label: '{' + '{epigraph ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{epigraph ref|',
+
pre: '{' + '{epigraph ref|',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'au': {
+
'au-ref': {
label: '{' + '{au ref}}',
+
label: '{' + '{au ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{au ref|',
+
pre: '{' + '{au ref|',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'msh': {
+
'msh-ref': {
label: '{' + '{msh ref}}',
+
label: '{' + '{msh ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{msh ref|',
+
pre: '{' + '{msh ref|',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'tes': {
+
'tes-ref': {
label: '{' + '{tes ref}}',
+
label: '{' + '{tes ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{tes ref|',
+
pre: '{' + '{tes ref|',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'file': {
+
'file-ref': {
label: '{' + '{file ref}}',
+
label: '{' + '{file ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{file ref|',
+
pre: '{' + '{file ref|',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'mapref': {
+
'map-ref': {
label: '{' + '{map ref}}',
+
label: '{' + '{map ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{map ref|',
+
pre: '{' + '{map ref|',
post: '}}'
+
post: '}}'
}
+
}
}
+
}
},
+
},
'url': {
+
'url-ref': {
label: '{' + '{url ref}}',
+
label: '{' + '{url ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{url ref|url=',
+
pre: '{' + '{url ref|url=',
post: '|text=|date=|site=}}'
+
post: '|text=|date=|site=}}'
}
+
}
}
+
}
},
+
},
'17s': {
+
'17s-ref': {
label: '{' + '{17s ref}}',
+
label: '{' + '{17s ref}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{17s ref|topic/news/post',
+
pre: '{' + '{17s ref|topic/news/post',
post: '|id#|description|date=}}'
+
post: '|id#|description|date=}}'
}
+
}
}
+
}
}
+
}
}
+
}
}
+
}
}
+
}
}
+
}
}
+
}
} );
+
} );
 
</pre>
 
</pre>
 
|}
 
|}
Line 549: Line 549:
 
|
 
|
 
<pre>
 
<pre>
//Add new build-a-box dropdown to the "advanced" section
+
//Add new build-a-box dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
+
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
+
section: 'advanced',
groups: {
+
groups: {
list: {
+
list: {
tools: {
+
tools: {
simplecharacterinfobox: {
+
simplecharacterinfobox: {
label: 'build-a-box',
+
label: 'build-a-box',
type: 'select',
+
type: 'select',
list: {
+
list: {
'start': {
+
'start': {
label: '{' + '{character',
+
label: '{' + '{character',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '{' + '{character'
+
pre: '{' + '{character'
}
+
}
}
+
}
},
+
},
'residence': {
+
'residence': {
label: '|residence=',
+
label: '|residence=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|residence='
+
pre: '\n' + '|residence='
}
+
}
}
+
}
},
+
},
'imageparam': {
+
'imageparam': {
label: '|image=',
+
label: '|image=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|image='
+
pre: '\n' + '|image='
}
+
}
}
+
}
},
+
},
'profession': {
+
'profession': {
label: '|profession=',
+
label: '|profession=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|profession='
+
pre: '\n' + '|profession='
}
+
}
}
+
}
},
+
},
'#profession': {
+
'#profession': {
label: '|#profession=',
+
label: '|#profession=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|#profession='
+
pre: '\n' + '|#profession='
}
+
}
}
+
}
},
+
},
'skills': {
+
'skills': {
label: '|skills=',
+
label: '|skills=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|skills='
+
pre: '\n' + '|skills='
}
+
}
}
+
}
},
+
},
'species': {
+
'species': {
label: '|species=',
+
label: '|species=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|species='
+
pre: '\n' + '|species='
}
+
}
}
+
}
},
+
},
'abilities': {
+
'abilities': {
label: '|abilities=',
+
label: '|abilities=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|abilities='
+
pre: '\n' + '|abilities='
}
+
}
}
+
}
},
+
},
'ethnicity': {
+
'ethnicity': {
label: '|ethnicity=',
+
label: '|ethnicity=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|ethnicity='
+
pre: '\n' + '|ethnicity='
}
+
}
}
+
}
},
+
},
'born': {
+
'born': {
label: '|born=',
+
label: '|born=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|born='
+
pre: '\n' + '|born='
}
+
}
}
+
}
},
+
},
'died': {
+
'died': {
label: '|died=',
+
label: '|died=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|died='
+
pre: '\n' + '|died='
}
+
}
}
+
}
},
+
},
'nationality': {
+
'nationality': {
label: '|nationality=',
+
label: '|nationality=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|nationality='
+
pre: '\n' + '|nationality='
}
+
}
}
+
}
},
+
},
'bonded': {
+
'bonded': {
label: '|bonded=',
+
label: '|bonded=',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|bonded='
+
pre: '\n' + '|bonded='
}
+
}
}
+
}
}
+
}
}
+
}
}
+
}
}
+
}
}
+
}
}
+
}
} );
+
} );
 
</pre>
 
</pre>
 
|}
 
|}
Line 696: Line 696:
 
|
 
|
 
<pre>
 
<pre>
//Add new infobox endings dropdown to the "advanced" section
+
//Add new infobox endings dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
+
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
+
section: 'advanced',
groups: {
+
groups: {
list: {
+
list: {
tools: {
+
tools: {
endings: {
+
endings: {
label: 'ends',
+
label: 'ends',
type: 'select',
+
type: 'select',
list: {
+
list: {
'sa': {
+
'sa': {
label: 'Stormlight',
+
label: 'Stormlight',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|world=Roshar' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[The Stormlight Archive]]' + '\n' + '}}'
+
pre: '\n' + '|world=Roshar' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[The Stormlight Archive]]' + '\n' + '}}'
}
+
}
}
+
}
},
+
},
'mbe1': {
+
'mbe1': {
label: 'MB Era 1',
+
label: 'MB Era 1',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|world=Scadrial' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Mistborn Era 1]]' + '\n' + '}}'
+
pre: '\n' + '|world=Scadrial' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Mistborn Era 1]]' + '\n' + '}}'
}
+
}
}
+
}
},
+
},
'mbe2': {
+
'mbe2': {
label: 'MB Era 2',
+
label: 'MB Era 2',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|world=Scadrial' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Mistborn Era 2]]' + '\n' + '}}'
+
pre: '\n' + '|world=Scadrial' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Mistborn Era 2]]' + '\n' + '}}'
}
+
}
}
+
}
},
+
},
'wb': {
+
'wb': {
label: 'Warbreaker',
+
label: 'Warbreaker',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|world=Nalthis' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Warbreaker]]' + '\n' + '}}'
+
pre: '\n' + '|world=Nalthis' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Warbreaker]]' + '\n' + '}}'
}
+
}
}
+
}
},
+
},
'ela': {
+
'ela': {
label: 'Elantris',
+
label: 'Elantris',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|world=Sel' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Elantris (book)|Elantris]]' + '\n' + '}}'
+
pre: '\n' + '|world=Sel' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[Elantris (book)|Elantris]]' + '\n' + '}}'
}
+
}
}
+
}
},
+
},
'alc': {
+
'alc': {
label: 'Alcatraz',
+
label: 'Alcatraz',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|earth=Alcatraz' + '\n' + '|books=[[Alcatraz Versus the Evil Librarians (series)|Alcatraz Versus the Evil Librarians]]' + '\n' + '}}'
+
pre: '\n' + '|earth=Alcatraz' + '\n' + '|books=[[Alcatraz Versus the Evil Librarians (series)|Alcatraz Versus the Evil Librarians]]' + '\n' + '}}'
}
+
}
}
+
}
},
+
},
'ws': {
+
'ws': {
label: 'White Sand',
+
label: 'White Sand',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|world=Taldain' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[White Sand]]' + '\n' + '}}'
+
pre: '\n' + '|world=Taldain' + '\n' + '|universe=[[Cosmere]]' + '\n' + '|books=[[White Sand]]' + '\n' + '}}'
}
+
}
}
+
}
},
+
},
'first-born': {
+
'skyward': {
label: 'Firstborn',
+
label: 'Skyward',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '|nation=High Empire' + '\n' + '|books=[[Firstborn]]' + '\n' + '}}'
+
pre: '\n' + '|world=',
 
post: '\n' + '|universe=[[Cytoverse]]' + '\n' + '|books=[[Skyward (series)]]' + '\n' + '}}'
}
 
}
+
}
},
+
}
'skyward': {
+
}
label: 'Skyward',
+
}
action: {
+
}
 
}
type: 'encapsulate',
 
options: {
+
}
 
}
pre: '\n' + '|world=',
 
 
} );
post: '\n' + '|universe=[[Cytoverse]]' + '\n' + '|books=[[Skyward (series)]]' + '\n' + '}}'
 
}
 
}
 
}
 
}
 
}
 
}
 
}
 
}
 
} );
 
 
</pre>
 
</pre>
 
|}
 
|}
Line 806: Line 797:
 
|
 
|
 
<pre>
 
<pre>
//Add new page ends dropdown to the "advanced" section
+
//Add new page ends dropdown to the "advanced" section
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
+
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'advanced',
+
section: 'advanced',
groups: {
+
groups: {
list: {
+
list: {
tools: {
+
tools: {
bottoms: {
+
bottoms: {
label: 'bottoms',
+
label: 'bottoms',
type: 'select',
+
type: 'select',
list: {
+
list: {
'pagename': {
+
'pagename': {
label: '{' + '{SUBST:PAGENAME}}',
+
label: '{' + '{SUBST:PAGENAME}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '\'\'\'{' + '{SUBST:PAGENAME}}\'\'\''
+
pre: '\n' + '\'\'\'{' + '{SUBST:PAGENAME}}\'\'\''
}
+
}
}
+
}
},
+
},
'subpagename': {
+
'notes': {
label: '{' + '{SUBST:SUBPAGENAME}}',
+
label: '== Notes ==',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '\'\'\'{' + '{SUBST:SUBPAGENAME}}\'\'\''
+
pre: '\n\n' + '== Notes =='
}
+
}
}
+
}
},
+
},
'notes': {
+
'refsection': {
label: '== Notes ==',
+
label: '<' + 'references/>',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n\n' + '== Notes =='
+
pre: '\n' + '<' + 'references />'
}
+
}
}
+
}
},
+
},
'refsection': {
+
'stub': {
label: '<' + 'references/>',
+
label: '{' + '{stub}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '<' + 'references />'
+
pre: '\n' + '{' + '{stub}}'
}
+
}
}
+
}
},
+
},
'stub': {
+
'partial': {
label: '{' + '{stub}}',
+
label: '{' + '{partial}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{stub}}'
+
pre: '\n' + '{' + '{partial}}'
}
+
}
}
+
}
},
+
},
'partial': {
+
'complete': {
label: '{' + '{partial}}',
+
label: '{' + '{complete}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{partial}}'
+
pre: '\n' + '{' + '{complete}}'
}
+
}
}
+
}
},
+
},
'complete': {
+
'alcatraz': {
label: '{' + '{complete}}',
+
label: '{' + '{Alcatraz}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{complete}}'
+
pre: '\n' + '{' + '{Alcatraz}}'
}
+
}
}
+
}
},
+
},
'alcatraz': {
+
'elantris': {
label: '{' + '{Alcatraz}}',
+
label: '{' + '{Elantris}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{Alcatraz}}'
+
pre: '\n' + '{' + '{Elantris}}'
}
+
}
}
+
}
},
+
},
'elantris': {
+
'mbera1': {
label: '{' + '{Elantris}}',
+
label: '{' + '{Mistborn|Era 1}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{Elantris}}'
+
pre: '\n' + '{' + '{Mistborn|Era 1}}'
}
+
}
}
+
}
},
+
},
'mbera1': {
+
'mbera2': {
label: '{' + '{Mistborn|Era 1}}',
+
label: '{' + '{Mistborn|Era 2}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{Mistborn|Era 1}}'
+
pre: '\n' + '{' + '{Mistborn|Era 2}}'
}
+
}
}
+
}
},
+
},
'mbera2': {
+
'reckoners': {
label: '{' + '{Mistborn|Era 2}}',
+
label: '{' + '{Reckoners}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{Mistborn|Era 2}}'
+
pre: '\n' + '{' + '{Reckoners}}'
}
+
}
}
+
}
},
+
},
'reckoners': {
+
'sky': {
label: '{' + '{Reckoners}}',
+
label: '{' + '{Skyward}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{Reckoners}}'
+
pre: '\n' + '{' + '{Skyward}}'
}
+
}
}
+
}
},
+
},
'sky': {
+
'stormlight': {
label: '{' + '{Skyward}}',
+
label: '{' + '{Stormlight}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{Skyward}}'
+
pre: '\n' + '{' + '{Stormlight}}'
}
+
}
}
+
}
},
+
},
'storm': {
+
'warbreaker': {
label: '{' + '{Stormlight}}',
+
label: '{' + '{Warbreaker}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{Stormlight}}'
+
pre: '\n' + '{' + '{Warbreaker}}'
}
+
}
}
+
}
},
+
},
'warbreaker': {
+
'whitesand': {
label: '{' + '{Warbreaker}}',
+
label: '{' + '{White Sand}}',
action: {
+
action: {
type: 'encapsulate',
+
type: 'encapsulate',
options: {
+
options: {
pre: '\n' + '{' + '{Warbreaker}}'
+
pre: '\n' + '{' + '{White Sand}}'
}
+
}
}
+
}
},
+
}
'firstborn': {
+
}
label: '{' + '{Firstborn}}',
+
}
action: {
+
}
 
}
type: 'encapsulate',
 
 
}
options: {
 
 
} );
pre: '\n' + '{' + '{Firstborn}}'
 
}
 
} },
 
'whitesand': {
 
label: '{' + '{White Sand}}',
 
action: {
 
type: 'encapsulate',
 
options: {
 
pre: '\n' + '{' + '{White Sand}}'
 
}
 
}
 
}
 
}
 
}
 
}
 
}
 
}
 
} );
 
 
</pre>
 
</pre>
 
|}
 
|}
Line 1,013: Line 987:
 
//These next two reference templates are very long so they are done differently
 
//These next two reference templates are very long so they are done differently
 
{
 
{
action: {
+
'action': {
type: 'encapsulate',
+
'type': 'encapsulate',
 
options: {
 
options: {
 
pre: '{' + '{url ref|url=',
 
pre: '{' + '{url ref|url=',
Line 1,020: Line 994:
 
}
 
}
 
},
 
},
label: '{' + '{url ref}}'
+
'label': '{' + '{url ref}}'
 
},
 
},
 
{
 
{
action: {
+
'action': {
type: 'encapsulate',
+
'type': 'encapsulate',
 
options: {
 
options: {
 
pre: '{' + '{17s ref|topic/news/post',
 
pre: '{' + '{17s ref|topic/news/post',
Line 1,174: Line 1,148:
 
group: 'BBBB',
 
group: 'BBBB',
 
tools: {
 
tools: {
CCCC: {
+
"CCCC": {
 
label: 'DDDD',
 
label: 'DDDD',
 
type: 'button',
 
type: 'button',
Line 1,211: Line 1,185:
 
type: 'select',
 
type: 'select',
 
list: {
 
list: {
WWWW: {
+
'WWWW': {
 
label: 'XXXX',
 
label: 'XXXX',
 
action: {
 
action: {
Line 1,236: Line 1,210:
 
<pre>
 
<pre>
 
},
 
},
WWWW: {
+
'WWWW': {
 
label: 'XXXX',
 
label: 'XXXX',
 
action: {
 
action: {
Line 1,259: Line 1,233:
 
<pre>
 
<pre>
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
sections: {
+
'sections': {
 
'AAAA': {
 
'AAAA': {
type: 'toolbar',
+
'type': 'toolbar',
label: 'BBBB'
+
'label': 'BBBB'
 
}
 
}
 
}
 
}
Line 1,275: Line 1,249:
 
<pre>
 
<pre>
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section:: 'CCCC',
+
'section': 'CCCC',
 
'groups': {
 
'groups': {
 
'DDDD': {
 
'DDDD': {
label: 'EEEE'
+
'label': 'EEEE'
 
}
 
}
 
}
 
}
Line 1,296: Line 1,270:
 
//Optional description
 
//Optional description
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
sections: {
+
'sections': {
 
'AAAA': {
 
'AAAA': {
type: 'booklet',
+
'type': 'booklet',
label: 'BBBB',
+
'label': 'BBBB',
pages: {
+
'pages': {
 
</pre>
 
</pre>
   
Line 1,321: Line 1,295:
 
<pre>
 
<pre>
 
//Optional description
 
//Optional description
CCCC: {
+
'section-CCCC': {
label: 'DDDD',
+
'label': 'DDDD',
layout: 'characters',
+
'layout': 'characters',
characters: [
+
'characters': [
 
</pre>
 
</pre>
   
Line 1,349: Line 1,323:
 
<pre>
 
<pre>
 
{
 
{
action: {
+
'action': {
type: 'encapsulate',
+
'type': 'encapsulate',
options: {
+
'options': {
pre: 'XXXX',
+
'pre': 'XXXX',
post: 'YYYY'
+
'post': 'YYYY'
 
}
 
}
 
},
 
},
label: 'ZZZZ'
+
'label': 'ZZZZ'
 
},
 
},
 
</pre>
 
</pre>
Line 1,374: Line 1,348:
 
//Remove the default <ref> button
 
//Remove the default <ref> button
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
section:: 'main',
+
'section': 'main',
group:: 'insert',
+
'group': 'insert',
tool:: 'reference'
+
'tool': 'reference'
 
});</pre>
 
});</pre>
 
|}
 
|}
Line 1,389: Line 1,363:
 
//remove the bulleted list button
 
//remove the bulleted list button
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
section:: 'advanced',
+
'section': 'advanced',
group:: 'format',
+
'group': 'format',
tool:: 'ulist'
+
'tool': 'ulist'
 
});</pre>
 
});</pre>
 
|}
 
|}
Line 1,404: Line 1,378:
 
//remove the numbered list button
 
//remove the numbered list button
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
section:: 'advanced',
+
'section': 'advanced',
group:: 'format',
+
'group': 'format',
tool:: 'olist'
+
'tool': 'olist'
 
});</pre>
 
});</pre>
 
|}
 
|}
Line 1,419: Line 1,393:
 
//remove the default <br> button (to replace it with a <br/> button which is preferred on the Coppermind)
 
//remove the default <br> button (to replace it with a <br/> button which is preferred on the Coppermind)
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
section:: 'advanced',
+
'section': 'advanced',
group:: 'format',
+
'group': 'format',
tool:: 'newline'
+
'tool': 'newline'
 
});</pre>
 
});</pre>
 
|}
 
|}
Line 1,434: Line 1,408:
 
//remove table button
 
//remove table button
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
section:: 'advanced',
+
'section': 'advanced',
group:: 'insert',
+
'group': 'insert',
tool:: 'table'
+
'tool': 'table'
 
});</pre>
 
});</pre>
 
|}
 
|}
Line 1,449: Line 1,423:
 
//remove File button
 
//remove File button
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
section:: 'main',
+
'section': 'main',
group:: 'insert',
+
'group': 'insert',
tool:: 'file'
+
'tool': 'file'
 
});</pre>
 
});</pre>
 
|}
 
|}
Line 1,464: Line 1,438:
 
//remove original link button
 
//remove original link button
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
section:: 'main',
+
'section': 'main',
group:: 'insert',
+
'group': 'insert',
tool:: 'link'
+
'tool': 'link'
 
});</pre>
 
});</pre>
 
|}
 
|}
Line 1,479: Line 1,453:
 
<pre>
 
<pre>
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
 
$( '#wpTextbox1' ).wikiEditor( 'removeFromToolbar', {
section:: 'XXXX',
+
'section': 'XXXX',
group:: 'YYYY',
+
'group': 'YYYY',
tool:: 'ZZZZ'
+
'tool': 'ZZZZ'
 
});</pre>
 
});</pre>
 
|}
 
|}

Please note that all contributions to The Coppermind are considered to be released under the CC4 by-nc-nd (see Coppermind:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Templates used on this page: