ProfessionalWiki / ProfessionalWiki/Maps
Add Extension:WikiEditor toolbar integration
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- JavaScript
- Stars
- 78
- Forks
- 65
- Avg merge
- 9h 17m
- Merged PRs (30d)
- 6
Description
https://www.mediawiki.org/wiki/Topic:Vordfbar0y535akp
var customizeToolbar = function () {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'advanced',
group: 'insert',
tools: {
"Map": {
label: 'Insert map',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/b/b4/OOjs_UI_icon_map-ltr.svg',
action: {
type: 'encapsulate',
options: {
pre: '{{#display_map:',
peri: "Example street 1, Berlin~'''Heading'''~Short description; optional: 2nd marker",
post: '|fullscreen=on}}'
}
}
}
}
});
};
/* 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 () {
if ( mw.user.options.get( 'usebetatoolbar' ) == 1 ) {
$.when(
mw.loader.using( 'ext.wikiEditor' ), $.ready
).then( customizeToolbar );
}
} );
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked MediaWiki topic and Extension:WikiEditor documentation first, then locate the Maps extension's client-side integration entry point. Compare the requested snippet with the extension structure and verify the toolbar appears in edit or submit mode when the beta toolbar is enabled, with the map insertion action available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100