Help:Source Editor
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
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:
- - will
'''bold'''
any highlighted text. - - will
''italicize''
any highlighted text. - - will insert a signature (
~~~~
). Only available on talk pages. - - opens the Insert link tool.
- - opens the Insert file tool.
- - adds
<ref>
tags around highlighted text. Not shown on talk pages. - - activates syntax highlighting.
- > Advanced - shows advanced editing tools.
- > Special characters - shows the special characters palette.
- > Help - shows some basic wikicode guidance.
- - allows for switching to VisualEditor (in supported namespaces).
Insert link tool
Clicking 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.
Insert file tool
Clicking 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.
Syntax highlighting
Clicking 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".
Advanced
Clicking > Advanced on the toolbar shows the following extra options:
- - dropdown menu that allows for creating the desired level of section heading.
- - will create a new bulleted (unordered) list item on a new line.
- - will create a new numbered (ordered) list item on a new line.
- - adds
<nowiki>
tags around highlighted text. - - inserts a
<br>
tag. - - adds
<big>
tags around highlighted text. - - adds
<small>
tags around highlighted text. - - adds
<sup>
tags around highlighted text. - - adds
<sub>
tags around highlighted text. - - will create a new gallery on a new line.
- - will create a new redirect. This must be used on the first line of the page to have any effect.
- - opens the Insert table tool.
- - opens the Search and replace tool.
Insert table tool
Clicking 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.
Search and replace tool
Clicking 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.
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.
Legacy toolbar
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:
- - will
'''bold'''
any highlighted text. - - will
''italicize''
any highlighted text. - - adds
[[
]]
around highlighted text, creating an internal link. - - adds
[
]
around highlighted text, creating an external link. - - inserts a new section heading.
- - inserts the wikicode required to insert an image from the Bulbagrden Archives.
- - 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).
- - adds
<nowiki>
tags around highlighted text. - - will insert a signature (
~~~~
). This should only be used on talk pages. - - 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
- 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
Navigation | Navigation • Search • Tracking changes • Logging in • Watchlist |
---|---|
Editing | Editing pages • VisualEditor • Wikicode (Images • Tables) • Talk pages • Categories • Subpages • Cheatsheet |
Advanced | Starting a new page • Moving (renaming) a page • Merging pages • Splitting pages • Deleting pages • References • Special pages |
Templates | Using templates (Link templates • Color templates) • Creating templates (Parser functions • TemplateData) • Lua (Crash course) |
Customization | Preferences • Skins • Custom CSS • User page • Signatures |
Archives | FAQ • Uploading images • Tagging images • Manual of style |
Introduction • FAQ • Editor's Hub |