Skip to content

Latest commit

 

History

History
90 lines (70 loc) · 4.06 KB

README.md

File metadata and controls

90 lines (70 loc) · 4.06 KB

Source Editor

Source Editor formats wikitext and citations and manages references in the active MediaWiki source editor. Accepted changes return to that editor for review.

Features

  • Switch the open source page to native CodeMirror.
  • Format selected text, a section, or a page.
  • Generate citations from URLs, identifiers, text, or manual details.
  • Browse, reuse, and review existing sources and sub-references.
  • Preview named references in either native source editor.
  • Preview local article links in the textbox or CodeMirror.

Install and open

Build or obtain kanade-source-editor.user.js or kanade-source-editor.min.js using the root installation guide. Open Edit source, then select Source Editor in page tools. Disable the userscript or remove the wiki script to uninstall.

For an account-wide Wikimedia installation, use Meta-Wiki global.js. A wiki administrator can install the compact file as MediaWiki:Gadget-source-editor.js with this gadget entry.

* source-editor[ResourceLoader]|source-editor.js

Use

Use the bottom-right shortcuts to format the active source, manage references, or switch the native editor. The control panel lets you adjust formatting and save a preset for future edits.

Default CodeMirror preference above highlighted Nintendo wikitext

Screenshot source is Nintendo, revision 1379167316 by English Wikipedia contributors under CC BY-SA 4.0. See capture provenance.

Open the manager from the References shortcut or References → Manage references. Filter sources in Source content. When one source matches, press Enter to insert its reference at the editor selection and return to the editor. Choose Generate source to start a draft. Leave the field empty for manual entry. Review the draft before inserting or updating a citation.

The Label column shows the reference name with spaces in place of underscores. Unnamed citations can use their author and year as a label. If a label is unavailable for a short footnote, the table shows its {{Sfn}} call. The Source column shows the title with its language in parentheses when available. Hover over a linked title to see its URL. The author, publication or website, and date appear below as separate chips. Click a chip to select its full text for copying. Given names appear first when the citation uses separate name fields or a recognizable comma-delimited name.

Pasting a web URL into Source content or a citation URL field removes its utm_source query parameter.

In Edit citation source, select Duplicate source to copy the draft. The dialog lists every citation field and lets you choose how to inherit each one before reviewing and inserting the new citation.

  • Keep copies the field's value and existing key by default.
  • Use as key uses the current text as the field's key and leaves the field ready for a new value. The key supplies reference-name text or, for url, a shared source key.
  • Clear empties the field's value, key, and reference-name directives.

Reference

Source Editor builds on Cacycle's wikEd. See third-party notices.