User talk:Robinr78/common.js: Difference between revisions

From Robin's SM-201 Website
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
User:Robinr78/common.js
var customizeToolbar = function () {


https://commons.wikimedia.org/wiki/WikiEditor_Toolbar_Icons
/* Stable as of 2019-1007-1300 */
<hr>
 
<pre>
var customizeToolbar = function () {


/* Add { {footers}} group =============================*/
/* ======================================Add SM-201 & category Sections */


$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
Line 14: Line 10:
'type': 'toolbar', // Can also be 'booklet'
'type': 'toolbar', // Can also be 'booklet'
'label': 'SM-201'
'label': 'SM-201'
// or 'labelMsg': 'section-emoticons-label' for a localized label
}
}
} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'sections': {
'Cats': {
'type': 'toolbar', // Can also be 'booklet'
'label': 'Cats'
}
}
} );
 
 
/* ===============================================================Add groups */
 
/* -------------------add Format group ------------------- */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'SM-201',
'groups': {
'Format': {
'label': 'Format'
}
}
}
}
} );
} );


/* ------------------- add <inc> group ----------------------*/
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'SM-201',
'section': 'SM-201',
'groups': {
'groups': {
'Format': {
'Inc': {
'label': 'Format' // or use labelMsg for a localized label, see above
'label': 'Inc'  
}
}
}
}
} );
} );


/* ------------------- add footers group ----------------------*/
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'SM-201',
'section': 'SM-201',
'groups': {
'groups': {
'Footers': {
'Footer': {
'label': 'Footers' // or use labelMsg for a localized label, see above
'label': 'Footer'  
}
}
}
}
} );
} );


/* ------------------- add Categories group -----------------*/
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
'section': 'Cats',
'groups': {
'Cats': {
'label': 'Cats'
}
}
} );
/* Add <Inc> buttons ============================================================ */
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
group: 'Inc',
tools: {
"Incl": {
label: 'Incl',
type: 'button',
  icon: 'http://www.sm-201.org/a/images/3/3b/Button_in.jpg',
action: {
type: 'encapsulate',
options: {
pre: "<includeonly>",
                                        post:"</includeonly>"
}
}
}
}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
group: 'Inc',
tools: {
"Noinclude": {
label: 'Noinclude',
type: 'button',
      icon: 'http://www.sm-201.org/a/images/1/1b/Button_no.jpg',
action: {
type: 'encapsulate',
options: {
pre: "<noinclude>",
                                        post:"</noinclude>"
}
}
}
}
});


/* ===================================================== */
/* Add footer buttons ============================================================*/
/* Add Footers */


/* Add { {Biofooters}} */
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
"Footer": {
label: 'Footer',
type: 'button',
  icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png',
action: {
type: 'encapsulate',
options: {
pre: "{ {Header}}",
                                        post:"{ {Footer}}"
}
}
}
}
});
 
 
/* Add Biofooters - Biographies */
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
group: 'Footer',
tools: {
tools: {
"Biofooter": {
"Biofooter": {
Line 52: Line 144:
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: "{ {Bioheader}}<br>",
pre: "{ {Bioheader}}",
                                         post:"{ {Biofooter}}<br>"
                                         post:"{ {Biofooter}}"
}
}
}
}
Line 60: Line 152:
});
});


/* Add { {Historyfooter}} */
/* Add Historyfooter */
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
tools: {
"Historyfooter": {
"Historyfooter": {
Line 80: Line 172:
});
});


/* Add { {Libfooter}} */
/* Add Libfooter Library*/
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
tools: {
"Libraryfooter": {
"Libraryfooter": {
Line 100: Line 192:
});
});


/* Add { {Lifefooter}} */
/* Add Lifefooter */
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
tools: {
"Life Lessons footer": {
"Life Lessons footer": {
Line 121: Line 213:




/* Add { {Macrofooter}} */
/* Add Macrofooter */
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
tools: {
"Life Lessons footer": {
"Life Lessons footer": {
Line 142: Line 234:




/* Add { {Microfooter}} */
/* Add Microfooter */
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
tools: {
"Micropedia footers": {
"Micropedia footers": {
Line 163: Line 255:




/* Add { {PMfooters}} */
/* Add PMfooters */
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
tools: {
"Robins Personal memories": {
"Robins Personal memories": {
label: 'Robin Mem',
label: 'Robin Mem',
type: 'button',
type: 'button',
   icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png',
   icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
Line 183: Line 275:
});
});


/* Add { {Storyfooters}} */
/* Add Storyfooters */
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
tools: {
"Storyfooter": {
"Storyfooter": {
Line 203: Line 295:
});
});


/* Add { {Timefooters}} */
/* Add Timefooters */
$('#wpTextbox1').wikiEditor('addToToolbar', {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
section: 'SM-201',
group: 'Footers',
group: 'Footer',
tools: {
tools: {
"Timefooter": {
"Timefooter": {
Line 224: Line 316:


/*=====================Format Buttons====================================*/
/*=====================Format Buttons====================================*/
/* Toolbar <Comment Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'SM-201',
group: 'Format',
tools: {
"Comment": {
label: 'Comment',
type: 'button',
icon: 'http://www.sm-201.org/a/images/6/66/Editor_!.png',
action: {
type: 'encapsulate',
options: {
pre:  '<!-- ',
post: ' -->'
}
}
}
}
} );
/* Toolbar Apostrophe Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'SM-201',
group: 'Format',
tools: {
"Apostrope": {
label: 'Apostrphe',
type: 'button',
icon: 'http://www.sm-201.org/a/images/3/39/Editor_apos.png',
action: {
type: 'encapsulate',
options: {
pre:  "'",
post: "'"
}
}
}
}
} );
/* Add  'clear'  =====================*/
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'SM-201',
group: 'Format',
tools: {
"Clear": {
label: 'Clear',
type: 'button',
icon: 'http://sm-201.org/a/images/b/be/Editor_c.png',
action: {
type: 'encapsulate',
options: {
pre: '<br clear="all"> ',
post: ''
}
}
}
}
});
/* Toolbar gallery button =======================*/
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'SM-201',
group: 'Format',
tools: {
"Gallery": {
label: 'Gallery',
type: 'button',
icon: 'http://www.sm-201.org/a/images/3/35/Editor_g.png',
action: {
type: 'encapsulate',
options: {
pre:  '<gallery mode="packed> ',
post: '</gallery>'
}
}
}
}
} );


/* Toolbar [[ ]] Button  */
/* Toolbar [[ ]] Button  */
Line 245: Line 423:
} );
} );


/* Toolbar {{ }} Button  */
/* Toolbar double curly brackets Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'SM-201',
section: 'SM-201',
Line 291: Line 469:
group: 'Format',
group: 'Format',
tools: {
tools: {
"Quotes": {
"Center": {
label: 'Quotes',
label: 'Center',
type: 'button',
type: 'button',
icon: 'http://www.sm-201.org/a/images/5/5f/Button_center.png',
icon: 'http://www.sm-201.org/a/images/5/5f/Button_center.png',
Line 327: Line 505:
});
});


/*  =============================================Category Buttons =================================== */
/* Add buttons ======================================= */
/* Toolbar Category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Cats": {
label: 'Category',
type: 'button',
icon: 'http://www.sm-201.org/a/images/d/d0/Button_Cat.Png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:',
post: ']]'
}
}
}
}
} );
/* Toolbar Anatomy category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Template": {
label: 'Human anatomy',
type: 'button',
icon: 'http://www.sm-201.org/a/images/e/e0/Editor_a.png',
action: {
type: 'encapsulate',
options: {
pre:  '{{club}}',
post: ''
}
}
}
}
} );
/* Toolbar Anatomy category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Template": {
label: 'Book',
type: 'button',
icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png',
action: {
type: 'encapsulate',
options: {
pre:  '{{book}}',
post: ''
}
}
}
}
} );
/* Toolbar "Classes" category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Template": {
label: 'Classes',
type: 'button',
icon: 'http://www.sm-201.org/a/images/b/be/Editor_c.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Class]]',
post: ''
}
}
}
}
} );
/* Toolbar "Club" category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Template": {
label: '{{Club}}',
type: 'button',
icon: 'http://www.sm-201.org/a/images/b/be/Editor_c.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Club]]',
post: ''
}
}
}
}
} );
/* Toolbar "Events" category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Events": {
label: 'Events',
type: 'button',
icon: 'http://www.sm-201.org/a/images/e/e3/Editor_e.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Events]]',
post: ''
}
}
}
}
} );
/* Toolbar "Film" category button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Film": {
label: 'Film',
type: 'button',
icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Cateory:Film]]',
post: ''
}
}
}
}
} );
/* Toolbar Film category button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Film": {
label: 'Film',
type: 'button',
icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Cateory:Film]]',
post: ''
}
}
}
}
} );
/* Toolbar Icon category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Icon": {
label: 'Icon',
type: 'button',
icon: 'http://www.sm-201.org/a/images/5/5e/Editor_i.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Icon]]',
post: ''
}
}
}
}
} );
/* Toolbar Link category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Link": {
label: 'Link',
type: 'button',
icon: 'http://www.sm-201.org/a/images/1/16/Editor_l.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Link]]',
post: ''
}
}
}
}
} );
/* Toolbar N=Info Box category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Info box": {
label: 'Info box',
type: 'button',
icon: 'http://www.sm-201.org/a/images/0/0e/Editor_n.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Info box]]',
post: ''
}
}
}
}
} );
/* Toolbar Magazine category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Magazine": {
label: 'Magazine',
type: 'button',
icon: 'http://www.sm-201.org/a/images/6/6d/Editor_m_.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Magazine]]',
post: ''
}
}
}
}
} );
/* Toolbar Places category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Places": {
label: 'Places',
type: 'button',
icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Places]]',
post: ''
}
}
}
}
} );
/* Toolbar Stories by Robin category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Robin": {
label: 'Robin',
type: 'button',
icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Stories by Robin]]',
post: ''
}
}
}
}
} );
/* Toolbar Sessions category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Sessions": {
label: 'Sessions',
type: 'button',
icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Sessions]]',
post: ''
}
}
}
}
} );
/* Toolbar Toy box category Button  */
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
section: 'Cats',
group: 'Cats',
tools: {
"Toy box": {
label: 'Toy box',
type: 'button',
icon: 'http://www.sm-201.org/a/images/1/19/Editor_t.png',
action: {
type: 'encapsulate',
options: {
pre:  '[[Category:Toy box]]',
post: ''
}
}
}
}
} );
/* Leave everything below this line alone ===================== */
};
};


Line 340: Line 851:
} );
} );
}
}
</pre>
<hr>
{{Editor icons}}

Revision as of 20:04, 7 October 2019

var customizeToolbar = function () {

/* Stable as of 2019-1007-1300 */

/* ======================================Add SM-201 & category Sections */

$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'sections': { 'SM-201': { 'type': 'toolbar', // Can also be 'booklet' 'label': 'SM-201' } } } ); $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'sections': { 'Cats': { 'type': 'toolbar', // Can also be 'booklet' 'label': 'Cats' } } } );


/* ===============================================================Add groups */

/* -------------------add Format group ------------------- */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Format': { 'label': 'Format' } } } );

/* ------------------- add <inc> group ----------------------*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Inc': { 'label': 'Inc' } } } );

/* ------------------- add footers group ----------------------*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Footer': { 'label': 'Footer' } } } );

/* ------------------- add Categories group -----------------*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'Cats', 'groups': { 'Cats': { 'label': 'Cats' } } } );



/* Add <Inc> buttons ============================================================ */

$('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Inc', tools: { "Incl": { label: 'Incl', type: 'button',

  icon: 'http://www.sm-201.org/a/images/3/3b/Button_in.jpg', 

action: { type: 'encapsulate', options: { pre: "" } } } } });


$('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Inc', tools: { "Noinclude": { label: 'Noinclude', type: 'button',

     icon: 'http://www.sm-201.org/a/images/1/1b/Button_no.jpg', 

action: { type: 'encapsulate', options: { pre: "",

                                       post:""

} } } } });

/* Add footer buttons ============================================================*/ /* Add Footers */

$('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Footer": { label: 'Footer', type: 'button',

 icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png',

action: { type: 'encapsulate', options: { pre: "{ {Header}}",

                                       post:"{ {Footer}}"

} } } } });


/* Add Biofooters - Biographies */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Biofooter": { label: 'Biofooter', type: 'button',

 icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png',

action: { type: 'encapsulate', options: { pre: "{ {Bioheader}}",

                                       post:"{ {Biofooter}}"

} } } } });

/* Add Historyfooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Historyfooter": { label: 'History footer', type: 'button',

 icon: 'http://www.sm-201.org/a/images/e/e4/Editor_h.png',

action: { type: 'encapsulate', options: { pre: "{ {Historyheader}}",

                                       post: "{ {Historyfooter}}"

} } } } });

/* Add Libfooter Library*/ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Libraryfooter": { label: 'Libraryfooter', type: 'button',

 icon: 'http://www.sm-201.org/a/images/e/e0/Editor_book.png',

action: { type: 'encapsulate', options: { pre: "{ {Libheader}}",

                                       post: "{ {Libfooter}}"

} } } } });

/* Add Lifefooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Life Lessons footer": { label: 'Lifefooter', type: 'button',

 icon: 'http://www.sm-201.org/a/images/1/16/Editor_l.png',

action: { type: 'encapsulate', options: { pre: "{ {Lifeheader}}",

                                       post: "{ {Lifefooter}}"

} } } } });


/* Add Macrofooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Life Lessons footer": { label: 'Macrofooter', type: 'button',

 icon: 'http://www.sm-201.org/a/images/f/fc/Editor_mac.png',

action: { type: 'encapsulate', options: { pre: "{ {Macroheader}}",

                                       post: "{ {Macrofooter}}"

} } } } });


/* Add Microfooter */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Micropedia footers": { label: 'Microfooter', type: 'button',

 icon: 'http://www.sm-201.org/a/images/9/95/Editor_mic.png',

action: { type: 'encapsulate', options: { pre: "{ {Microheader}}",

                                       post: "{ {Microfooter}}"

} } } } });


/* Add PMfooters */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Robins Personal memories": { label: 'Robin Mem', type: 'button',

 icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png',

action: { type: 'encapsulate', options: { pre: "{ {Pmheader}}",

                                       post: "{ {Pmfooter}}"

} } } } });

/* Add Storyfooters */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Storyfooter": { label: 'Storyfooter', type: 'button',

 icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png',

action: { type: 'encapsulate', options: { pre: "{ {Storyheader}}
",

                                       post:"{ {Storyfooter}}
"

} } } } });

/* Add Timefooters */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footer', tools: { "Timefooter": { label: 'Timefooter', type: 'button',

 icon: 'http://www.sm-201.org/a/images/1/19/Editor_t.png',

action: { type: 'encapsulate', options: { pre: "{ {Timeheader}}
",

                                       post:"{ {Timefooter}}
"

} } } } });

/*=====================Format Buttons====================================*/

/* Toolbar <Comment Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Comment": { label: 'Comment', type: 'button', icon: 'http://www.sm-201.org/a/images/6/66/Editor_!.png', action: { type: 'encapsulate', options: { pre: } } } } } );

/* Toolbar Apostrophe Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Apostrope": { label: 'Apostrphe', type: 'button', icon: 'http://www.sm-201.org/a/images/3/39/Editor_apos.png', action: { type: 'encapsulate', options: { pre: "'", post: "'" } } } } } );

/* Add 'clear' =====================*/

$('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Clear": { label: 'Clear', type: 'button', icon: 'http://sm-201.org/a/images/b/be/Editor_c.png', action: { type: 'encapsulate', options: { pre: '
', post: } } } } });


/* Toolbar gallery button =======================*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Gallery": { label: 'Gallery', type: 'button', icon: 'http://www.sm-201.org/a/images/3/35/Editor_g.png', action: { type: 'encapsulate', options: {

pre: '

'

} } } } } );



/* Toolbar [[ ]] Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Template": { label: 'Link', type: 'button', icon: 'http://www.sm-201.org/a/images/c/c0/Button_link.png', action: { type: 'encapsulate', options: { pre: '[[', post: ']]' } } } } } );

/* Toolbar double curly brackets Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'SM-201', group: 'format', tools: { "Template": { label: 'Template', type: 'button', icon: 'http://www.sm-201.org/a/images/5/5f/Button_temp.png', action: { type: 'encapsulate', options: { pre: "{{", post: "}}" } } } } } );

/* Quotes */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Quotes": { label: 'Quotes', type: 'button', icon: 'http://www.sm-201.org/a/images/7/7d/Button_quot.png', action: { type: 'encapsulate', options: { pre: '"', post: '"', } } } } });


/* Center */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Center": { label: 'Center', type: 'button', icon: 'http://www.sm-201.org/a/images/5/5f/Button_center.png', action: { type: 'encapsulate', options: {

pre: '

', post: '

',

} } } } });


/* Justify */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Format', tools: { "Justify": { label: 'Justify', type: 'button', icon: 'http://www.sm-201.org/a/images/0/0f/Button_just.png', action: { type: 'encapsulate', options: {

pre: '

', post: '

',

} } } } });

/* =============================================Category Buttons =================================== */


/* Add buttons ======================================= */

/* Toolbar Category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Cats": { label: 'Category', type: 'button', icon: 'http://www.sm-201.org/a/images/d/d0/Button_Cat.Png', action: { type: 'encapsulate', options: { pre: '[[Category:', post: ']]' } } } } } );

/* Toolbar Anatomy category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Human anatomy', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e0/Editor_a.png', action: { type: 'encapsulate', options: { pre: ' ', post: } } } } } );

/* Toolbar Anatomy category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Book', type: 'button', icon: 'http://www.sm-201.org/a/images/b/b4/Editor_b.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } ); /* Toolbar "Classes" category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: 'Classes', type: 'button', icon: 'http://www.sm-201.org/a/images/b/be/Editor_c.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );


/* Toolbar "Club" category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Template": { label: ' ', type: 'button', icon: 'http://www.sm-201.org/a/images/b/be/Editor_c.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );


/* Toolbar "Events" category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Events": { label: 'Events', type: 'button', icon: 'http://www.sm-201.org/a/images/e/e3/Editor_e.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );

/* Toolbar "Film" category button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Film": { label: 'Film', type: 'button', icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png', action: { type: 'encapsulate', options: { pre: 'Cateory:Film', post: } } } } } );

/* Toolbar Film category button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Film": { label: 'Film', type: 'button', icon: 'http://www.sm-201.org/a/images/3/31/Editor_f.png', action: { type: 'encapsulate', options: { pre: 'Cateory:Film', post: } } } } } );

/* Toolbar Icon category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Icon": { label: 'Icon', type: 'button', icon: 'http://www.sm-201.org/a/images/5/5e/Editor_i.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );


/* Toolbar Link category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Link": { label: 'Link', type: 'button', icon: 'http://www.sm-201.org/a/images/1/16/Editor_l.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );


/* Toolbar N=Info Box category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Info box": { label: 'Info box', type: 'button', icon: 'http://www.sm-201.org/a/images/0/0e/Editor_n.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );


/* Toolbar Magazine category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Magazine": { label: 'Magazine', type: 'button', icon: 'http://www.sm-201.org/a/images/6/6d/Editor_m_.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );

/* Toolbar Places category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Places": { label: 'Places', type: 'button', icon: 'http://www.sm-201.org/a/images/b/bf/Editor_p.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );

/* Toolbar Stories by Robin category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Robin": { label: 'Robin', type: 'button', icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );


/* Toolbar Sessions category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Sessions": { label: 'Sessions', type: 'button', icon: 'http://www.sm-201.org/a/images/6/60/Editor_s.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );

/* Toolbar Toy box category Button */ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { section: 'Cats', group: 'Cats', tools: { "Toy box": { label: 'Toy box', type: 'button', icon: 'http://www.sm-201.org/a/images/1/19/Editor_t.png', action: { type: 'encapsulate', options: { pre: , post: } } } } } );


/* Leave everything below this line alone ===================== */ };

/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */ if ( [ 'edit', 'submit' ].indexOf( mw.config.get( 'wgAction' ) ) !== -1 ) { mw.loader.using( 'user.options' ).then( function () { // This can be the string "0" if the user disabled the preference (phab:T54542#555387) if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) { $.when( mw.loader.using( 'ext.wikiEditor' ), $.ready ).then( customizeToolbar ); } } ); }