MediaWiki:Common.js: Difference between revisions

no edit summary
(Hiragana, katakana)
No edit summary
 
(15 intermediate revisions by the same user not shown)
Line 8: Line 8:
//Begin all the $textarea.wikiEditor stuff
//Begin all the $textarea.wikiEditor stuff
$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
section: 'advanced',
sections: {
group: 'format',
extended: {
tools: {
type: 'toolbar', // Can also be 'booklet',
comment: {
label: 'Extended'
label: 'Comment',
// or labelMsg: 'section-templates-label' for a localized label
type: 'button',
icon: 'https://upload.wikimedia.org/wikipedia/commons/3/37/Btn_toolbar_commentaire.png',
action: {
type: 'encapsulate',
options: {
pre: '<!-- ',
post: ' -->'
}
}
}
}
}
} );
}
} );
 


$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
section: 'advanced',
section: 'extended',
group: 'format',
groups: {
tools: {
list: {
hline: {
tools: {
label: 'Horizontal line',
ttemplates: {
type: 'button',
label: 'Time Templates',
icon: 'https://upload.wikimedia.org/wikipedia/commons/a/a4/H-line_icon.png',
type: 'select',
action: {
list: {
type: 'encapsulate',
'dsa1': {
options: {
label: '{{dsa|birth=|death=}}',
pre: '----',
action: {
ownline: true
type: 'encapsulate',
options: {
pre: '{{dsa|birth=',
post: '|death=}}'
}
}
},
'dsa2': {
label: '{{dsa|birth=|birthphrase=|death=|deathphrase=}}',
action: {
type: 'encapsulate',
options: {
pre: '{{dsa|birth=',
post: '|birthphrase=|death=|deathphrase=}}'
}
}
},
'aidh': {
label: '{{aidh||}}',
action: {
type: 'encapsulate',
options: {
pre: '{{aidh|',
post: '|}}'
}
}
},
'yyyymmddlink': {
label: '{{YYYYMMDDtoLinks|}}',
action: {
type: 'encapsulate',
options: {
pre: '{{YYYYMMDDtoLinks|',
post: '}}'
}
}
},
'yyyymmddfjylink': {
label: '{{YYYYMMDDtoFjYLinks|}}',
action: {
type: 'encapsulate',
options: {
pre: '{{YYYYMMDDtoFjYLinks|',
post: '}}'
}
}
},
}
}
}
}
}
}
}
} );
$textarea.wikiEditor( 'addToToolbar', {
sections: {
emoticons: {
type: 'toolbar', // Can also be 'booklet',
label: 'Templates Section'
// or labelMsg: 'section-templates-label' for a localized label
}
}
}
}
Line 57: Line 88:


$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
section: 'main',
section: 'extended',
groups: {
groups: {
list: {
list: {
tools: {
tools: {
templates: {
templates: {
label: 'Templates',
label: 'Categories',
type: 'select',
type: 'select',
list: {
list: {
'Ping-button': {
'cPeople': {
label: '{{Ping}}',
label: 'People',
action: {
type: 'encapsulate',
options: {
pre: '[[Category:People]]'
}
}
},
'cFPeople': {
label: 'Fictional People',
action: {
type: 'encapsulate',
options: {
pre: '[[Category:Fictional People]]',
}
}
},
'cTVShows': {
label: 'Television Shows',
action: {
type: 'encapsulate',
options: {
pre: '[[Category:Television Shows]]',
}
}
},
'cTVSeasons': {
label: 'Television Seasons',
action: {
type: 'encapsulate',
options: {
pre: '[[Category:Television Seasons]]',
}
}
},
'cMovies': {
label: 'Movies',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{Ping|',
pre: '[[Category:Movies]]',
post: '}}'
}
}
}
}
},
},
'Clear-button': {
'cBooks': {
label: 'Clear',
label: 'Books',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{Clear}}'
pre: '[[Category:Books]]',
}
}
}
}
},
},
'Done-button': {
'cVGs': {
label: 'Done',
label: 'Video Games',
action: {
action: {
type: 'encapsulate',
type: 'encapsulate',
options: {
options: {
pre: '{{Done}}'
pre: '[[Category:Video Games]]',
}
}
}
}
}
},
}
}
}
}
Line 101: Line 167:


$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
section: 'characters',
section: 'extended',
pages: {
groups: {
emoticons: {
list: {
layout: 'characters',
tools: {
label: 'Emoticons',
misc: {
characters: [ ':)', ':))', ':(', '<3', ';)' ]
label: 'Misc',
type: 'select',
list: {
'comments': {
label: 'Comment',
action: {
type: 'encapsulate',
options: {
pre: '<!-- ',
post: ' -->'
}
}
},
'nowiki': {
label: 'Nowiki',
action: {
type: 'encapsulate',
options: {
pre: '<nowiki>',
post: '</nowiki>'
}
}
},
'horline': {
label: 'Horizontal Line',
action: {
type: 'encapsulate',
options: {
pre: '----',
ownline: true
}
}
},
'defsort': {
label: 'Default Sort',
action: {
type: 'encapsulate',
options: {
pre: '{{DEFAULTSORT:',
post: '}}'
}
}
},
'lcasetitle': {
label: 'Lowercase title',
action: {
type: 'encapsulate',
options: {
pre: '{{lowercase title}}',
}
}
},
}
}
}
}
}
}
}
} );
} );


$textarea.wikiEditor( 'addToToolbar', {
$textarea.wikiEditor( 'addToToolbar', {
Line 132: Line 253:
}
}
} );
} );