Open main menu

Changes

Help:Wiki Tutorial/Editing/VisualEditor

14,384 bytes removed, 5 years ago
m
Abs # path.
{{Wiki_Tutorial_Menu}}
{| width="100%" cellspacing="15" style="background:#f8f8f8; border-bottom: 1px solid #ccc;"
|'''VisualEditor'''
|{{Clickable button 2|Help:Wiki_Tutorial/Editing/Structured Discussions|Structured Discussions|class=mw-ui-progressive}}
|{{Clickable button 2|Help:Wiki_Tutorial/Editing/Wikitext|Wikitext|class=mw-ui-progressive}}
|}
{| class="plainlinks" cellspacing="0" cellpadding="0" width="100%" style="background:#eaecf0; color:#54595d; margin-top: 0; width: 100% !important;"
| style="padding-left: 1em;" |
| style="padding: 1em;" |
<div style="max-width:70em; margin:auto;">
{{Imbox|text=<br>
*'''[https://en.wikipedia.org/wiki/VisualEditor VisualEditor]''' gives you the ability to edit without needing to learn wikitext markup, as is required by the default [[Help:Wikitext|Wikitext]] editor. Unlike that editor, VisualEditor will display the text being edited [[rich-text editor|https://en.wikipedia.org/wiki/WYSIWYG almost as if it were already published]]. This guide gives illustrated, step-by-step instructions on the editor's features, although it may occasionally lag behind the release of new ones.*Be aware that VisualEditor is still in development and thus has [https://en.wikipedia.org/wiki/Wikipedia:VisualEditor#Limitations known limitations] and bugs. For example, particularly for larger pages, VisualEditor can be slower than wikitext, and it is not available on talk/forum/discussion pages, where [[Help:Structured_Discussions|Structured Discussions]] tool is in place. While VisualEditor remains in development, you should [[Help:Wiki_Tutorial/Editing/VisualEditor#Saving changes|review your changes]] to ensure that the edits are those you intended.
}}
__TOC__
==Availability==
VisualEditor is available on the following types of pages (namespaces): *PLACEHOLDERHelp, Project, Fellow, 2020, User, File, Category, GeoJson, (Main)
==First step: enabling VE==
|-
| [[File:VisualEditor - Toolbar - Linking.png|thumb|border|300px|center]]
| '''Linking tool:''' The chain icon is the [[Help:Wiki_Tutorial/Editing/VisualEditor#Editing links|linking tool]]. Clicking on it (usually after selecting some text) opens the [[Help:Wiki_Tutorial/Editing/VisualEditor#Editing links|link dialog]].
|-
| colspan=2 | <hr />
| [[File:VisualEditor Insert Menu-en.png|thumb|border|250px|center]]
| '''{{int:visualeditor-toolbar-insert}}:''' The "{{int:visualeditor-toolbar-insert}}" menu may be different on some projects. Below is a list of '''all''' options that may appear.
* The "{{int:visualeditor-dialogbutton-media-tooltip}}" icon (a picture of mountains) opens the [[Help:Wiki_Tutorial/Editing/VisualEditor#Editing images and other media files|media dialog]].* The "{{int:visualeditor-dialogbutton-template-tooltip}}" icon (a puzzle piece) allows you to [[Help:Wiki_Tutorial/Editing/VisualEditor#Editing templates|edit templates]].
* The "{{int:visualeditor-commentinspector-tooltip}}" item (a speech balloon with a "!") allows you to insert comments that are not visible to readers; these comments can be seen only when in edit mode and are then indicated by an exclamation mark icon.
* The table item allows you to insert a table.
* The "{{int:visualeditor-mwgalleryinspector-title}}" icon (a set of photos) allows you to insert a gallery to the page.
* The "{{int:math-visualeditor-mwmathinspector-title}}" icon (Σ) opens the [[Help:Wiki_Tutorial/Editing/VisualEditor#Editing mathematical formulae|formula inserter dialog]].
* The "{{int:wikihiero-visualeditor-mwhieroinspector-title}}" icon (an [[:w:ankh|ankh]] symbol - ☥) allows you to enter the hieroglyphics inserter. (<s>See below.</s> Not mentioned again.)
* The "{{int:visualeditor-dialogbutton-referenceslist-tooltip}}" icon (three books) opens a dialog in which you can specify where will references be displayed to the reader. Usually this only needs to be done once on every page.
|-
| [[File:VisualEditor More Settings-en.png|thumb|400px|border|center]]
| The '''{{int:visualeditor-pagemenu-tooltip}}''' menu is to the left of the ''Publish changes'' button. On this menu there are options to adjust page settings, such as whether the page is a redirect, or how it is indexed; to [[Help:Wiki_Tutorial/Editing/VisualEditor#Editing categories|add, edit, or delete categories]]. You can also switch (one-way only) from VisualEditor to the classic wikitext source editor without losing the editing work you've done.
|}
|-
| colspan=2 |
=== Editing images ==={|
|-
| To add a new image (or another type of media file) to the page, click the "{{int:visualeditor-dialogbutton-media-tooltip}}" icon (a picture of mountains) in the "{{int:visualeditor-toolbar-insert}}" menu. The image will be added wherever your cursor is.
| [[File:VisualEditor Media Insert Menu-en.png|thumb|border|150px|center]]
|
*To add a new image (or another type of media file) to the page, click the "{{int:visualeditor-dialogbutton-media-tooltip}}" icon (a picture of mountains) in the "{{int:visualeditor-toolbar-insert}}" menu.
*The image will be added wherever your cursor is.
|-
| colspan=2 | <hr />
|-
| Clicking the "{{int:visualeditor-dialogbutton-media-tooltip}}" icon opens a dialog that automatically searches Wikimedia Commons and your local wiki for media files related to the title of the page you're editing.
 
You can change the search by changing the text in the dialog's search box.
 
To choose a file, click on its thumbnail image.
 
This places the image onto the page you are editing.
| [[File:VisualEditor - Media editing 2.png|thumb|border|center|500px]]
|
*Clicking the "{{int:visualeditor-dialogbutton-media-tooltip}}" icon opens a dialog that automatically searches Wikimedia Commons and your local wiki for media files related to the title of the page you're editing.
*You can change the search by changing the text in the dialog's search box.
*To choose a file, click on its thumbnail image.
*This places the image onto the page you are editing.
|-
| colspan=2 | <hr />
|-
| After the image you selected is inserted into the page, another dialog will open. This dialog allows you to add and edit the caption of the image. The caption can contain formatting and links.
| [[File:VisualEditor - Media editing 6.png|thumb|border|center|500px]]
 
|
*After the image you selected is inserted into the page, another dialog will open.
*This dialog allows you to add and edit the caption of the image. The caption can contain formatting and links.
|-
| colspan=2 | <hr />
|-
| The media dialog also allows you to add alternative text captions, to help users who use screen readers, or who have disabled image display.
| [[File:VisualEditor - Media editing 7.png|thumb|border|center|300px]]
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor - Media editing 8.png|thumb|border|center|500px]]
 
| You can also set various parameters for the image in the "{{int:visualeditor-advancedsettings-tool}}" window. These include the alignment, the type, and size of the image.
| [[File:VisualEditor - Media editing 8.png|thumb|border|center|500px]]
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor Apply Changes-en.png|thumb|border|center|150px]]
 
| When you're done, click "{{int:visualeditor-dialog-action-apply}}" to close the dialog and return to editing the page.
| [[File:VisualEditor Apply Changes-en.png|thumb|border|center|150px]]
|-
| colspan=2 | <hr />
|-
|For an existing image, you can add or edit a caption or other settings by clicking on the image, then clicking on the "{{int:visualeditor-dialogbutton-media-tooltip}}" icon that appears below the picture.
 
You can resize an existing image by clicking on it, then moving the resize icon (the two-headed arrow on one or both bottom corners).
 
You can also drag and drop an image to a place higher or lower on the page.
| [[File:VisualEditor - Media editing 3.png|thumb|border|center|360px]]
|}
 
=== Editing media galleries ===
 
{| cellpadding="15"
<!--
|-
| To add a new gallery, click the "{{int:visualeditor-mwgalleryinspector-title}}" icon (a set of photos) on the "{{int:visualeditor-toolbar-insert}}" menu. (If you don't see this icon on that menu, then your local wiki has decided to delay implementing this functionality in VisualEditor.)
| [[File:VisualEditor - Gallery1.png|thumb|border|150px|center]]
|-
| colspan=2 | <hr /> -->
|-
| colspan=2 | <hr />
|-
| To edit an existing gallery in VisualEditor, click that gallery. Then, near the bottom of the gallery, click the gallery icon (a set of photos). This brings up the gallery editor, with the full list of images included in the gallery.
| [[File:VisualEditor - Gallery2.png|thumb|border|center|500px]]
|-
| The gallery editor has two tabs, one to add images and their captions, the other controls display options.
 
The order of images can be rearranged by dragging the images on the left, and can be added using the "Add new image" button at the bottom of the list. The options tab allows size and layout to be edited. The default display options are preferred in most cases.
 
When you click the "{{int:visualeditor-dialog-action-done}}" button, you will exit the gallery editor. You should then see your changes, with the gallery as it will now appear to readers.
 
Remember that exiting the gallery editor does not save your changes. As with other changes made using VisualEditor, you must 'Publish' the entire page in order to save your work and make it viewable online.
| [[File:VisualEditor - Gallery3.png|thumb|border|center|400px]]
|}
 
== Editing templates ==
 
=== Starting ===
{| cellpadding="15"
|-
| To add a new template to a page, place your cursor where you want the template to be inserted, and click on the "{{int:visualeditor-dialogbutton-template-tooltip}}" icon (a puzzle piece) in the "{{int:visualeditor-toolbar-insert}}" menu.
| [[File:VisualEditor Template Insert Menu-en.png|thumb|border|300px|center]]
|-
| colspan=2 | <hr />
|-
| Start typing the name of the template you want to insert. When you see it on the list, click on its name. Then click "{{int:visualeditor-dialog-transclusion-add-template}}".
| [[File:VisualEditor - Template editing 4.png|thumb|border|500px|center]]
|-
| colspan=2 | <hr />
|-
| You can also edit a template that is already on the page. When you click on the template to select it, it turns blue, and a box appears with an "{{int:visualeditor-dialogbutton-template-tooltip}}" icon (a puzzle piece). Then click on the "{{int:vector-view-edit}}" link.
| [[File:VisualEditor - Template editing 1.png|thumb|border|300px|center]]
|-
| colspan=2 | <hr />
|-
|Some templates are not visible to someone reading a page. In VisualEditor, such hidden templates are shown as puzzle icons, such as [[Template:Anchor|Anchor]].
|[[File:VisualEditor template not visible.png|thumb|border|center|70px]]
|-
| colspan=2 | <hr />
|-
|When you select the icon, the context menu is displayed, and you can edit the template.
|[[File:VisualEditor template not visible context menu.png|thumb|border|center|300px]]
|-
| colspan=2 | <hr />
|-
| colspan=2 |
=== Template parameters ===
|-
|When you add a new template or open an existing one, VisualEditor opens the "{{int:visualeditor-dialog-transclusion-title}}" dialog. What you see depends upon whether there is TemplateData for that template.
|
|-| colspan=2 | <hr />|-| The template shown here has no TemplateData set up for it. The dialog shows a link to documentation for the template. You can read the documentation to figure out if the template has any parameters (fields), and what goes in each field. Use numbers as the name for each nameless parameter. The first un-named parameter is named <code>1</code>, the second is named <code>2</code>, and so forth.|[[File:VisualEditor template with no TemplateData.png|thumb|border|center|400px]]|-| colspan=2 | <hr />|-|If a template has been updated to contain [[VisualEditor/Portal/TemplateData#What_is_TemplateData.3F|TemplateData]] information, then the dialog will show a list of individual (named) parameters.|[[File:VisualEditor template with TemplateData.png|thumb|border|center|400px]]|-| colspan=2 | <hr />|-| *For an existing templateimage, you can add or edit a caption or other settings by clicking on the parameters shown in the dialogimage, and you can add parameters by then clicking on the "{{int:visualeditor-dialog-transclusiondialogbutton-addmedia-paramtooltip}}", at the very bottom of the dialog.| [[File:VisualEditor - Template editing 3.png|thumb|border|center|500px]]|-| colspan=2 | <hr />|-| When a template embeds other templates, these sub-templates will appear inside the parameters icon that display them. They can be edited or removed inside appears below the parameter fieldpictureNew sub-templates are added by following the steps for adding a parameter. *You may need to check the template documentation to make sure that the sub-template is supported. Nested templates can currently be edited as wikitext onlyresize an existing image by clicking on it, without then moving the facility offered by VisualEditor resize icon (see [[phab:T52182]]the two-headed arrow on one or both bottom corners).| [[File:VisualEditor - Template editing 5.png|thumb|border|center|500px]]|-| colspan=2 | <hr />|-|-| colspan=2 | === Finishing ===|-| When you have finished editing a template, click "{{int:visualeditor-dialog-action-apply}}" to close the dialog *You can also drag and return drop an image to editing the main page.| [[File:VisualEditor Apply Changes-en.png|thumb|border|center|150px]]|-| colspan=2 | <hr />|-| colspan=2 | === Substituting templates ===|-| When a template must be [[:w:en:Help:Substitution|substituted]], type <code><nowiki>subst:</nowiki></code> (colon included) before the template's name. Autocompletion doesn't work with <code><nowiki>subst:</nowiki></code>. If you want to use autocompletion, first find the template you are looking for, and then add <code><nowiki>subst:</nowiki></code> in front of the template name. Then, click the green "{{int:visualeditor-dialog-transclusion-add-template}}" button. Add any parameters as usual and click "{{int:visualeditor-dialog-action-insert}}".| [[File:VisualEditor - Template editing 7.png|thumb|border|center|400px]]|-| colspan=2 | <hr />|-| You will see the template expand place higher or lower on the page after you click "{{int:visualeditor-dialog-action-apply}}".| [[File:VisualEditor - Template editing 8.png|thumb|border|center|400px]]
|}
|-
| [[{{#ifexist:Media:VisualEditor Toolbar Lists and indentation-{{CONTENTLANGUAGE}}.png|File:VisualEditor Toolbar Lists and indentation-{{CONTENTLANGUAGE}}.png|File:VisualEditor Toolbar Lists and indentation-en.png}}|thumb|border|300px|center]]
| *You can use VisualEditor to create lists, or to change the format of an existing list. There are two types of lists: unordered (bullet) and ordered (numbered). *To start a new list, just click on one of the two menu items shown here. Or, if you already have typed the list (on separate lines), select (highlight) the list you have typed, then click on one of the menu items.
|-
| colspan=2 | <hr />
| You can even mix ordered (numbered) and unordered (bullet) lists, if the list items have different indentations.
|}
 
== Editing tables ==
 
{| cellpadding="15"
|-
| [[File:VisualEditor insert table.png|thumb|border|center|200px]]
| You can use VisualEditor to insert and change tables.
 
You can even import a table by dragging a comma-separated value (.csv) file from your computer into the main editing window.
|-
| colspan=2 | <hr />
|-
|When you click on "Table", in the "<tvar|toolbar>{{int:visualeditor-toolbar-insert}}</>" menu, VisualEditor inserts as a default a blank four-by-four table.
 
Now the "Table" menu is available. From that menu, you can add a caption to the top of the table.
|[[File:VisualEditor empty table.png|thumb|border|center|200px]]
|-
| colspan=2 | <hr />
|-
|To select a cell, click it once.
|[[File:VisualEditor tables select one cell.png|thumb|border|center|400px]]
|-
| colspan=2 | <hr />
|-
|To edit the contents of the cell (for example, to add content or to correct a spelling error), double click in the cell. Or you can select the cell and then press Return.
 
To end your editing of a cell, just click elsewhere.
|[[File:VisualEditor tables type inside a cell.png|thumb|border|center|400px]]|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor_table_editing_add_and_remove_columns.png|thumb|border|center|200px]]
| You can add or delete a column or a row.
|-
| colspan=2 | <hr />
|-
| You can merge cells: Select them, then from the Table menu, click on "Merge cells".
|[[File:VisualEditor tables merge cells.png|thumb|border|center|200px]]
|-
| colspan=2 | <hr />
|-
|If you merge cells, only the text in one cell is kept; any text in the other cells is deleted when you merge the cells. If you decide that you wanted some or all of the text that was deleted, use the Undo button, move or copy the text you want, then merge the cells again.
|[[File:VisualEditor tables post-merge cell.png|thumb|border|center|200px]]
|-
| colspan=2 | <hr />
|-
|You can also split cells that were previously merged. All the content that was in the merged cell will remain in the first cell when you do the split. You can then cut and paste text to other cells, if you want.
|[[File:VisualEditor tables split cells.png|thumb|border|center|200px]]
|}
 
== Editing categories ==
 
{| cellpadding="15"
|-
| [[File:VisualEditor category item-en.png|thumb|border|200px|center]]
| To edit categories, on the "{{int:visualeditor-pagemenu-tooltip}}" menu, click the "{{int:visualeditor-categories-tool}}" item. If the tool is not visible, first search for three horizontal lines. That's where it is.
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor category editing-en.png|thumb|border|center|500px]]
| Clicking on "{{int:visualeditor-categories-tool}}" opens a dialog that lists existing categories and allows you to add new ones, and to delete existing categories.
 
You also have the option of setting or changing the general (default) sorting key, which determines where the page appears when listed with other pages in the same category.
 
For example, the default sorting key for the article "George Washington" is "Washington, George". In the category "Presidents of the United States", the article is listed under the letter "W", not the letter "G".
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor - Category editing 3.png|thumb|border|center|500px]]
| To add a category for a page, type the name of the category into the field "{{int:visualeditor-dialog-meta-categories-input-placeholder}}". As you type, VisualEditor will search for possible matching, existing categories. You can either select an existing category, or you can add a category that doesn't yet have its own category page. (Until that category page is created, your new category will show as a red link after you publish all your editing changes.)
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor - Category editing 2.png|thumb|border|center|400px]]
| To remove an existing category, click on it and click on the "{{int:visualeditor-inspector-remove-tooltip}}" icon (trash can) in the dialog that opens.
 
Clicking on a category also allows you to specify a sorting key for that specific category. Such a sorting key overrides the default sorting key.
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor Apply Changes-en.png|thumb|border|center|150px]]
| Click "{{int:visualeditor-dialog-action-apply}}" when you're done editing categories to return to the page editor.
|}
 
== Editing page settings ==
 
{| cellpadding="15"
|-
| [[File:VisualEditor page settings item-en.png|thumb|border|500px|center]]
| To edit a page's settings, click to open the "{{int:visualeditor-pagemenu-tooltip}}" menu, in the toolbar, and select the "{{int:visualeditor-dialog-meta-settings-label}}" button.
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor Page Settings-en.png|thumb|border|center|400px]]
| The "{{int:visualeditor-dialog-meta-settings-label}}" button opens a dialog that shows several options.
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor Page Settings Redirects-en.png|thumb|border|center|500px]]
| You can make a page a redirect to another page by checking the "{{int:visualeditor-dialog-meta-settings-redirect-label}}" checkbox, and then typing the name of the page to which you want to send the reader who tries to go to the page that you're editing.
 
At the bottom is the option to prevent page renames from updating this redirect. This is very rarely used.
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor Page Settings TOC-en.png|thumb|border|center|500px]]
| You can change whether the page shows a Table of Contents by selecting one of these three buttons. The default option is "{{int:visualeditor-dialog-meta-settings-toc-default}}", which shows a Table of Contents if there are three or more headings.
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor Page Settings Edit Links-en.png|thumb|border|center|400px]]
| You can make a page not show edit links next to each section header by checking this checkbox.
|-
| colspan=2 | <hr />
|-
| [[File:VisualEditor Apply Changes-en.png|thumb|border|center|300px]]
| Click "{{int:visualeditor-dialog-action-apply}}" when you're done editing the {{int:visualeditor-pagemenu-tooltip}} to return to the page editor.
|}
 
== Editing mathematical formulae ==
 
{| cellpadding="15"
| To add a new mathematical formula to the page, place your cursor where you want it to be inserted, and click on the "{{int:math-visualeditor-mwmathinspector-title}}" icon ("Σ") in the "{{int:visualeditor-toolbar-insert}}" menu on the toolbar.
| [[File:VisualEditor Formula Insert Menu-en.png|thumb|border|400px|center]]
|-
| colspan=2 | <hr />
|-
| A window will open in which you can type the formula, using LaTeX syntax. VisualEditor will update the formula as you type it, so you can see how it will look as you make changes. Once you are happy with the formula, click the "{{int:visualeditor-dialog-action-done}}" button.
| [[File:VisualEditor formula-en.png|thumb|border|400px|center]]
|-
| colspan=2 | <hr />
|-
| To edit an existing mathematical formula on the page, click on it and then click on the "Σ" icon that appears. This will open up the formula window, where you make changes.
| [[File:VisualEditor - editing existing mathematical formula.png|thumb|border|400px|center]]
|-
| colspan=2 | <hr />
|-
| Mathematical formulae can be placed inline or centered as a block.
|[[File:VisualEditor mathematic formula inline.png|thumb|border|400px|center]]
|}
 
== Editing poems and other special items ==
 
{| cellpadding="15"
| Some items, such as association lists, poems, and musical scores, are not yet fully supported by VisualEditor.
| [[File:VisualEditor editing poem 1.png|thumb|border|400px|center]]
|-
| colspan=2 | <hr />
|-
| In most cases, the existing items can be edited, but new ones cannot be inserted in VisualEditor.
| [[File:VisualEditor editing poem 2.png|thumb|border|400px|center]]
|-
| colspan=2 | <hr />
|-
| You cannot add an automatic datestamp to a page in VisualEditor.
Until they are fully supported, you can copy an existing one from another page, or edit the source wikitext directly.
|
|}
----
<small><center>''For more information, please visit https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide''</center></small>
----
<div style="float:right; margin-top: 0.0em; margin-bottom:3px; background-color: #cee0f2; padding: .2em .6em; font-size: 130%; border:1px solid #A3B1BF;">'''Continue to''' '''[[Help:Wiki_Tutorial/Editing/Structured Discussions|Structured Discussions]]''' <span style="font-size: larger; font-weight: bold;">→</span></div>
==Moving pages==Moving a page with VisualEditor is functionally the same as moving it with the [[source editor]]; see [[HelpCategory:How to move a page]] for an introduction to moving Wiki help pages, or [[Wikipedia:Moving a page]] for more detailed instructions. == Keyboard shortcuts == Many editors are used to entering wikitext directly, especially bold, italics and wikilinks. [[mw:VisualEditor/Portal/Keyboard shortcuts|Keyboard shortcuts]] allow to quickly insert similar formatting without having to use toolbar items. Here are the common general shortcuts in VisualEditor: {| style="text-align:center; margin:auto;" cellpadding="15"|-! PC shortcut! Action! Mac shortcut|-| colspan=3 | <hr />|-| {{Key press|Ctrl|B}}| Bold| {{Key press|Cmd|B}}|-| colspan=3 | <hr />|-| {{Key press|Ctrl|I}}| Italics| {{Key press|Cmd|I}}|-| colspan=3 | <hr />|-| {{Key press|Ctrl|K}}| Insert link| {{Key press|Cmd|K}}|-| colspan=3 | <hr />|-| {{Key press|Ctrl|X}}| Cut| {{Key press|Cmd|X}}|-| colspan=3 | <hr />|-| {{Key press|Ctrl|C}}| Copy| {{Key press|Cmd|C}}|-| colspan=3 | <hr />|-| {{Key press|Ctrl|V}}| Paste| {{Key press|Cmd|V}}|-| colspan=3 | <hr />|-| {{Key press|Ctrl|Z}}| Undo| {{Key press|Cmd|Z}}|}</div>