Community Central
Community Central
View source Help Contents

The view source version of Help:Contents in place of the editor

RawActionInHelpContents

The raw version of Help:Contents

The view source function, also called the raw function, is a handy way to view the source of a specific article. This forces a specific article to display its source code. "View source" is only available on the desktop version, and is not accessible through the mobile skin.

Why does "View source" appear on articles?[]

The "View source" icon appears in place of the "Edit" button on pages with a protection level enabled, be it autoconfirmed or sysop-protected.

However, if the "View source" icon appears on pages that aren't protected, then the user trying to edit the article is either blocked locally on the wiki the article belongs to, or globally across the Fandom network; or the user does not log into their Fandom account and/or browses the wiki as an IP address/anonymous user (if the feature "Require all contributors to log in" is enabled).

How to view source[]

ViewSourceButton

The view source button

On any Fandom article page:

  1. At the end of the URL, add the following text: ?action=raw
  2. Visit that link; the page should display the source code of the article.
Light bulb icon
Alternatively viewing the source from the Edit menu.
You can click the "View source" button on protected pages or wherever it appears. However, if you are an autoconfirmed user in semi-protected pages, or a content moderator in fully protected pages, the "View source" button will turn into the "Edit" button. However, this button will always appear in non-whitelisted MediaWiki pages and personal CSS/JavaScript pages of other users. There's a nifty script at the Fandom Developers Wiki that adds a View Source button to your pages. Another script, called View Raw adds a "Raw" button to your pages.

Tips and tricks[]

  • If you want to make a page or template by starting with a protected page's source code, you can copy the protected page's source code and paste it on source editing area.
  • Copy and pasting the source of the page in VisualEditor will automatically put the <nowiki> and </nowiki> between wikitext content. Instead, the copied source should be pasted in using the source editor.
  • To view the source of any page, you can add ?action=raw to the end of the URL.

See also[]

Further help and feedback[]