Help:Source Editor

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
Shortcut
H:SE

Source Editor is the default wikicode editor used to edit and create pages on the wiki. It is the counterpart to the simplified What You See Is What You Get editor, VisualEditor. To access the Source Editor, click the "edit source" tab at the top of any page (or click "edit source" by a section heading to edit only that section).

At its core, the Source Editor is simply a textbox in which you enter the wikicode you require to create the page you desire. For this reason, at least a basic knowledge of wikicode is needed to use the Source Editor, and for some tasks the VisualEditor may be easier to use. For more complicated pages, or for pages which need lots of templates, the Source Editor is often the best bet.

To help make editing with the Source Editor easier, there is a choice of two toolbars that (so long as your browser has JavaScript enabled) offer a range of editing options.

Default toolbar

Source Editor with the default toolbar enabled

The default editing toolbar (sometimes called the "2010 wikitext editor") is what the majority of users see when they click "edit source". To enable this toolbar, go to the "Editing" tab in Special:Preferences, tick the box next to "Enable the editing toolbar", and click "Save".

Main options

The toolbar has the following options:


Insert link tool

Clicking Link on the toolbar will open the Insert link tool, which allows you to easily create internal or external links. When creating an internal link, the tool will check that the page you are trying to link to actually exists. When creating an external link, it will check you have formatted the URL correctly.

An internal link
An external link

Insert file tool

Clicking Images and media opens the Insert file tool, which allows you to correctly format the wikicode for including an image on a page. To be able to use this tool, you will need know the name of the file you want to include; find it by searching on the Bulbagarden Archives. The tool allows you to include a caption, add alt text and set the size, alignment and format of the image.

The Insert file tool


Syntax highlighting

Clicking Syntax highlighting on the editing toolbar will turn on syntax highlighting and show line numbers in the main text area. This highlighting more clearly shows how different formatting is working on the page, and editing articles with complex interacting templates is made significantly easier with the included bracket matching feature.

For colorblind users, and other users who have difficulty distinguishing between colors, a colorblind-friendly mode is available. To enable it, go to the "Editing" tab in Special:Preferences, and under "Accessibility" tick the box next to "Enable colorblind-friendly scheme for syntax highlighting when editing wikitext", and click "Save".

Some examples of syntax highlighting


Advanced

Advanced tools

Clicking  > Advanced  on the toolbar shows the following extra options:

  • Heading - dropdown menu that allows for creating the desired level of section heading.
  • Bulleted list  - will create a new bulleted (unordered) list item on a new line.
  • Numbered list  - will create a new numbered (ordered) list item on a new line.
  • No wiki formatting  - adds <nowiki> tags around highlighted text.
  • New line  - inserts a <br> tag.
  • Big  - adds <big> tags around highlighted text.
  • Small  - adds <small> tags around highlighted text.
  • Superscript  - adds <sup> tags around highlighted text.
  • Supscript  - adds <sub> tags around highlighted text.
  • Picture gallery  - will create a new gallery on a new line.
  • Redirect  - will create a new redirect. This must be used on the first line of the page to have any effect.
  • Table  - opens the Insert table tool.
  • Search and replace  - opens the Search and replace tool.


Insert table tool

Clicking Table opens the Insert table tool, which gives a series of options to create a basic table, including whether it should have a header row, if it should be sortable, and how many rows and columns there should be.

Selecting "Style with borders" will add class="wikitable" to the table header. This should be avoided, and in most cases class="roundy" should be used instead. See Help:Tables § Roundy tables for more information.

The Insert table tool


Search and replace tool

Clicking Search and replace opens the Search and replace tool. This powerful tool allows you to search the page for specific words or phrases and quickly replace them. This can be used to correct common spelling errors, or change outdated terminology quickly and efficiently. It can also mean that you make unintended changes quite easily, and should be used carefully.

The Search and replace too


Special characters

Clicking  > Special characters  on the toolbar shows the special characters palette, which allows you to insert characters and symbols from different languages and scipts into the main text area.

Special characters


Legacy toolbar

Source Editor with the legacy toolbar enabled

The legacy toolbar is a gadget available as a replacement for the default toolbar. To enable it, go to the "Editing" tab in Special:Preferences, untick the box next to "Enable the editing toolbar", and click "Save". Then go to the "Gadgets" tab, tick the box next to "⧼gadget-LegacyToolbar2006⧽" and click "Save".

The toolbar has the following options:

  • button_bold.png  - will '''bold''' any highlighted text.
  • button_italic.png  - will ''italicize'' any highlighted text.
  • button_link.png  - adds [[ ]] around highlighted text, creating an internal link.
  • button_extlink.png  - adds [ ] around highlighted text, creating an external link.
  • button_headline.png  - inserts a new section heading.
  • button_image.png  - inserts the wikicode required to insert an image from the Bulbagrden Archives.
  • button_media.png  - inserts the wikicode required to insert a file from the Bulbagrden Archives (at present, the Archives only contains images, so this button is functionally identical to the previous).
  • button_nowiki.png  - adds <nowiki> tags around highlighted text.
  • button_sig.png  - will insert a signature (~~~~). This should only be used on talk pages.
  • button_hr.png  - inserts a horizontal rule (----) on a new line. This should not normally be used in articles.

Syntax highlighting is not available when using the legacy toolbar.

Saving changes

The Source Editor save area
Main article: Help:Editing pages

Whichever toolbar you use, the area below the main text area remains the same. Here you can add an edit summary, select whether this was a minor edit, and whether you would like to watch the page.

There is also a Character palette, which like the default toolbar's special characters option, allows you to add various commonly used special characters to the main text area or the edit summary box.

Finally, there are the "Save page", "Show preview" and "Show changes" buttons, along with an option to "Cancel" all the changes you have made, and close the Source Editor.

Source editing in VisualEditor

It is possible to use the VisualEditor interface to edit an article's wikicode, rather than the classic Source Editor.

To enable this option, go to the "Editing" tab in Special:Preferences, tick the box next to "Use the wikitext mode inside the visual editor, instead of a different wikitext editor", and click "Save". Selecting this option will mean that when clicking "edit source", the VisualEditor will open in "wikitext mode", rather than the normal Source Editor.

The interface is very similar to the VisualEditor, however, instead of a WYSIWYG editor, you can directly edit the underlying wikicode. The only differences in the interface are that some options in the "Page options" menu are disabled, and a "Syntax higlighting" option is added (which functions the same as the one on the Source Editor's default toolbar). Previewing changes is done via the "Save changes…" dialog.

See also