Wikiwand AI

Wikipedia:Source editor

Wikipedia editing interface for source editing From Wikipedia, the free encyclopedia

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.

Article TextMate opened in wikitext editor with syntax highlighting (CodeMirror) turned on

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

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

The source editor contains several major parts:

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

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

Wikitext

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

The source editor is used to edit Lua modules.

JavaScript

The source editor is used to edit JavaScript source code stored in the MediaWiki namespace and in user namespace scripts.

CSS

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

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.

Related Articles

Timelines

Top Qs

Fact Checks