User talk:Robinr78/common.js
User:Robinr78/common.js
https://commons.wikimedia.org/wiki/WikiEditor_Toolbar_Icons
var customizeToolbar = function () { /* Add { {footers}} group =============================*/ $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'sections': { 'SM-201': { 'type': 'toolbar', // Can also be 'booklet' 'label': 'SM-201' // or 'labelMsg': 'section-emoticons-label' for a localized label } } } ); $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Format': { 'label': 'Format' // or use labelMsg for a localized label, see above } } } ); $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', { 'section': 'SM-201', 'groups': { 'Footers': { 'label': 'Footers' // or use labelMsg for a localized label, see above } } } ); /* ===================================================== */ /* Add { {Biofooters}} */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footers', 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}}<br>", post:"{ {Biofooter}}<br>" } } } } }); /* Add { {Historyfooter}} */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footers', 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}} */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footers', 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: 'Footers', 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: 'Footers', 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: 'Footers', 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: 'Footers', tools: { "Robins Personal memories": { label: 'Robin Mem', type: 'button', icon: 'http://www.sm-201.org/a/images/d/d5/Editor_r.png', action: { type: 'encapsulate', options: { pre: "{ {Pmheader}}", post: "{ {Pmfooter}}" } } } } }); /* Add { {Storyfooters}} */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footers', 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}}<br>", post:"{ {Storyfooter}}<br>" } } } } }); /* Add { {Timefooters}} */ $('#wpTextbox1').wikiEditor('addToToolbar', { section: 'SM-201', group: 'Footers', 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}}<br>", post:"{ {Timefooter}}<br>" } } } } }); /*=====================Format Buttons====================================*/ /* 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 {{ }} 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: { "Quotes": { label: 'Quotes', type: 'button', icon: 'http://www.sm-201.org/a/images/5/5f/Button_center.png', action: { type: 'encapsulate', options: { pre: '<center>', post: '</center>', } } } } }); /* 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: '<p align="justify">', post: '</p>', } } } } }); }; /* 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 ); } } ); }
eb Button_@.png |
F Plain footer H History Book Library Life lessons Macropeedia Micropedia Personal history Stories Time line |
A - Human Anatomy B - Books C - Classes C - Club history E - Events F - Film I - Icons N - Info box L - Links M - Magazines P - Places S - Sessions R - Stories by Robin T - Toys |
Paraphilias sa-clothing |
- https://commons.wikimedia.org/wiki/MediaWiki_edit_toolbar
- https://en.wikipedia.org/wiki/User:MarkS/Extra_edit_buttons
- https://commons.wikimedia.org/wiki/WikiEditor_Toolbar_Icons
- https://en.wikisource.org/wiki/Wikisource:Tools_and_scripts/More_editing_buttons
- https://www.mediawiki.org/wiki/Extension:WikiEditor/Toolbar_customization/Library
- http:/ /www.sm-201.org/a/images/