Help:Editing: Difference between revisions

ArrowHead294 (talk | contribs)
m Fix double redirect
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
Wikis should be easy to edit, so most text you add or change will appear as you expect it. But you can do more if you want.
Wikis should be easy to edit, so most text you add or change will appear as you expect it. But you can do more if you want.


[https://wikiindex.org/Xenharmonic_Wiki This wiki] is currently in [https://wikiindex.org/Category:ConfirmEmail ConfirmEmail mode] after the move from Wikispaces to a MediaWiki-based installation (the edit mode may change again some time). For editing or adding information to the wiki, you have to join it. See [[How to Get Your Xenwiki Account]] for more!
[https://wikiindex.org/Xenharmonic_Wiki This wiki] is currently in [https://wikiindex.org/Category:ConfirmEmail ConfirmEmail mode] after the move from Wikispaces to a MediaWiki-based installation (the edit mode may change again some time). For editing or adding information to the wiki, you have to join it. See [[Help:How to get your Xenharmonic Wiki account]] for more!


== Using links ==
== Using links ==
Line 48: Line 48:
Some typographic markup can easy be added by including the phrase in doubled <code><nowiki>''</nowiki></code> or tripled <code><nowiki>'''</nowiki></code> (apostrophe chars):
Some typographic markup can easy be added by including the phrase in doubled <code><nowiki>''</nowiki></code> or tripled <code><nowiki>'''</nowiki></code> (apostrophe chars):


* '''Bold''' using <code>{{'''}}bold{{'''}}</code>
* '''Bold''' using <code><nowiki>'''bold'''</nowiki></code>
* ''Italic'' using <code>{{''}}italic{{''}}</code>
* ''Italic'' using <code><nowiki>''italic''</nowiki></code>
* '''''Bold italic''''' using <code>{{'''}}{{''}}bold italic{{''}}{{'''}}</code>
* '''''Bold italic''''' using <code><nowiki>'''''bold italic'''''</nowiki></code>


=== Preformatted text ===
=== Preformatted text ===
Line 77: Line 77:
</pre>
</pre>


It is also possible to use Wiki markup within a <code><<nowiki />pre></code> tag, and have it actually be interpreted as markup instead of being escaped. This can be done using a self-closing <code>includeonly</code> tag (<code><<nowiki />includeonly /></code>), or (as seen on Wikipedia and many other sites) with <code>&lt;includeonly&gt;&lt;/includeonly&gt;</code>, as follows:
It is also possible to use Wiki markup within <code><<nowiki />pre></code> tags, and have it actually be interpreted as markup instead of being escaped. This can be done by inserting an <code>includeonly</code> directive in the opening tag, as <code style="white-space: nowrap;">&lt;includeonly /&gt;</code> or (as seen on Wikipedia and many other sites) <code style="white-space: nowrap;">&lt;includeonly&gt;&lt;/includeonly&gt;</code>, as follows:


<syntaxhighlight lang="wikitext">
<syntaxhighlight lang="wikitext">
Line 94: Line 94:
[[Wiki]] markup &amp; '''bold''' ''italic'' text
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</pre>
The <code><<nowiki />pre></code> tag also accepts styling, just like other HTML elements. Here, if you use the aformentioned <code>includeonly</code> directive, the styling should come after the directive:
<syntaxhighlight lang="wikitext">
<pre<includeonly /> style="color: blue;">
<!-- Comment -->
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
</syntaxhighlight>
gives
<pre<includeonly /> style="color: blue;">
<!-- Comment -->
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</pre>
==== Syntax highlighting ====
[[mw:extension:SyntaxHighlight|Syntax highlighting]] is a feature to display source code in different colors and fonts to indicate the structure to readers. Wrap the desired code between <code><<nowiki />syntaxhighlight></code> tags and input the desired programming language using the <code>lang</code> parameter in the opening tag. Unlike in <code><<nowiki />code></code> and <code><<nowiki />pre></code> tags, everything is escaped.
For example:
{{#tag: syntaxhighlight
|{{^(}}syntaxhighlight lang="wikitext"{{)^}}
{{^(}}!-- Comment --{{)^}}
[[Wiki]] markup &amp; '''bold''' ''italic'' text
{{^(}}/syntaxhighlight{{)^}}
|lang = wikitext
}}
gives
<syntaxhighlight lang="wikitext">
<!-- Comment -->
[[Wiki]] markup &amp; '''bold''' ''italic'' text
</syntaxhighlight>


=== Lists ===
=== Lists ===
Line 202: Line 241:
|}
|}


You can also copy some cells from a spreadsheet and paste them into the xenwiki visual editor, and a table will automatically be created!
You can also copy some cells from a spreadsheet and paste them into the [[mw:Extension:VisualEditor|visual editor]], and a table will automatically be created. Though, users should be aware that the resulting Wiki markup generated by the visual editor is often poorly formatted (e.g. without spaces that would otherwise make it easier to read).


==== Horizontal alignment of column content ====
==== Horizontal alignment of column content ====