Wikipedia:Source editor
This is an information page. It is not a Wikipedia policy or guideline; rather, its purpose is to explain certain aspects of Wikipedia's norms or practices. It may reflect varying levels of consensus. |

The source editor is a term for the web-based source-editing interface used to create and modify Wikipedia pages using wikitext. It is part of the MediaWiki software that powers Wikipedia and other Wikimedia projects.
The interface includes the edit toolbar, the main source-editing text area, preview and comparison tools, the edit summary field, and publishing controls. It is most commonly accessed through the Edit, Edit source, or [edit] button on an article or section.
Overview
[edit source]The source editor is used by editors and Wikipedians who work directly with the underlying wiki markup of a page. Unlike VisualEditor, which provides a more visual editing interface, the source editor displays the page's raw wikitext in an editable text box.
It is also used to edit Lua, JavaScript, and CSS source code.
Interface
[edit source]The source editor contains several major parts:
- Edit toolbar â a toolbar that helps insert formatting, links, files, and other markup. The toolbar also includes find and replace and other text editing tools.
- The main editing area under the toolbar, where the page's wikitext is displayed and edited.
- CharInsert â a toolbar under the main text area, which can be used to insert common characters and wikitext snippets.
- Edit summary â a text field used to describe the change being made.
- Preview tools â controls such as Show preview and Show changes, which allow editors to review edits before publishing.
- Publishing controls â buttons used to publish, preview, or cancel an edit.
The exact interface may vary depending on the editor's preferences, account status, browser, device, enabled gadgets, and whether the user is using the desktop or mobile site.
Previewing and publishing
[edit source]Before publishing an edit, editors can use Show preview to view how the page will appear and Show changes to compare the edited version with the previous version. These tools are useful for checking formatting, citations, links, tables, and templates before the edit is saved to the page history.
Editors are encouraged to add an edit summary before publishing. Edit summaries help other Wikipedians understand the purpose of a change when reviewing the page history, recent changes, or a watchlist.
Source editing
[edit source]Wikitext
[edit source]The source editor allows editors to directly change a page's wiki markup. Source editing is often used for precise changes to complex page elements, including templates, tables, references, and categories.
Lua
[edit source]The source editor is used to edit Lua modules.
JavaScript
[edit source]The source editor is used to edit JavaScript source code stored in the MediaWiki namespace and in user namespace scripts.
CSS
[edit source]The source editor is used to edit Cascading Style Sheets code stored in the MediaWiki namespace, TemplateStyles pages, user-specific style-sheets, and importable CSS distributed similarly to user scripts.
VisualEditor
[edit source]The source editor is closely related to VisualEditor, but the two editing modes are different. VisualEditor provides a more visual, WYSIWYG-style interface, while the source editor exposes the underlying wikitext.
Many experienced editors use the source editor for tasks that require precise control over markup, such as editing templates, repairing broken tables, adding categories, or updating footnotes and references.