You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "Wikitext"
m (Tag: 2017 source edit) |
m (Tag: 2017 source edit) |
{{TOC|limit=2}} ==What is Wikitext?== Wikitext is a simplified markup language that is used to format and structure text and other data. While HTML is the most common markup language for web pages, Wikitext is used in wiki systems. Like HTML, it uses tags to mark parts of tags or other data. ==How do I use Wikitext?== When you edit a page, you can switch between visual editing and source editing: [[File:Manual:editing.png|alt=Screenshot: Visual Editor switch edit mode|center]] Wikitext can be entered in source editing mode. When you are in visual editing mode, VisualEditor inserts Wikitext "behind the scenes". If VisualEditor doesn't format elements on a page correctly, you can always switch to source editing to correct the issues directly in Wikitext.<br /> ==Examples of Wikitext== Here are some typical examples of Wikitext: ===Text formatting=== *This is <code><nowiki>'''bold'''</nowiki></code> *This is <code><nowiki>''italic''</nowiki></code> *This is <code><nowiki><u>underlined</u></nowiki></code> ===Structuring=== ====Headings==== *(1st level): ''reserved for page title'' *2nd level: <code>==Section heading==</code> *3nd level: <code>===Section sub-heading===</code> ====Lists==== *ordered (numbered): <syntaxhighlight lang="html"> # One ## One-point-one ### One-point-one-point-one # Two </syntaxhighlight> *unordered (bulleted): <code>*</code> *definition list: <code>;Fire:provides energy and light</code> ====Tables==== <syntaxhighlight lang="html"> {| class="wikitable" |- !header 1 !header 2 |- |row 1, cell 1 |row 1, cell 2 |- |row 2, cell 1 |row 2, cell 2 |} </syntaxhighlight> ===Links=== ====Wiki internal==== *<code><nowiki>[[Page title]]</nowiki></code> *<code><nowiki>[[Pancake | Best pancake]]</nowiki></code><div class="slideexclude"> **this creates a link to the page "Pancake" with the link description "Best pancake". **see also the Mediawiki help page for links: https://www.mediawiki.org/wiki/Help:Links and the**help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages **links with parameters / links that open in a new tab: <code><nowiki><span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki><nowiki></span></nowiki></code><!-- end slideexclude: --></div> ====Wiki external==== *<code><nowiki>[[http://www.hallowelt.com Hallo Welt!]]</nowiki></code> *<code><nowiki>http://www.hallowelt.com</nowiki></code> ===Files/Images=== *'''Image link:''' <code><nowiki>[[Media:Someimage.png]]</nowiki></code> *'''Embed an image:''' <code><nowiki>[[File:Someimage.png]]</nowiki></code><div class="slideexclude"> *This embeds the image ''Someimage.png'' on the page. *embedding only happens when a link points to the "File" namespace *the wiki checks if a preview/thumbnail can be created automatically (e.g. image formats like "png", "jpeg", "gif", "svg") and then embeds a preview into the page *otherwise a link will be created to the wikipage in the "File" namespace (aka "file description page")<!-- end slideexclude: --></div> *'''Embed a file:''' <code><nowiki>[[Media:SomePDF.pdf]]</nowiki></code><section begin="slideexclude" /> **can be embedded: PDF, Tiff (needs extension) **cannot be embedded: Microsoft Office and Libre Office files; Shell-Scripts, ...<section end="slideexclude" /> '''Formatting example:''' <syntaxhighlight lang="html"> File:Someimage.png|thumb|50px|left|alt=Screenshot of the edit menu|The edit menu </syntaxhighlight> ===Miscellaneous=== {| class="contenttable" !Type of wikiText !Example |- |Special character |'''<code>&atilde;</code> → ã''' '''<code>&ccedil;</code> → ç''' UTF-8 is possible |- |Comment |<code>'''<nowiki><!-- unnoticed --></nowiki>'''</code> |- |No "wiki translation" |<code>'''<nowiki'''></code> and <code>'''</pre'''></code> |- |Table of contents |<code>'''<nowiki>__TOC__</nowiki>'''</code> and <code>'''<nowiki>__NOTOC__</nowiki>'''</code> |- |Signature |<code>'''<nowiki>--~~~</nowiki>'''</code> |- |Redirect |<code>'''<nowiki>#REDIRECT [[targetpage]]</nowiki>'''</code> |- |Template |<code>'''<nowiki>{{template name}}</nowiki>'''</code> |} {{Box Links-en |Topic1=https://meta.wikimedia.org/wiki/Help:Wikitext_examples |Topic2=[[MagicWords|Magic words]]}} <br /> [[en:{{FULLPAGENAME}}]] [[de:Wikitext]]
Line 60: | Line 60: | ||
*<code><nowiki>[[Page title]]</nowiki></code> | *<code><nowiki>[[Page title]]</nowiki></code> | ||
*<code><nowiki>[[Pancake | Best pancake]]</nowiki></code><div class="slideexclude"> | *<code><nowiki>[[Pancake | Best pancake]]</nowiki></code><div class="slideexclude"> | ||
− | *this creates a link to the page "Pancake" with the link description "Best pancake". | + | **this creates a link to the page "Pancake" with the link description "Best pancake". |
− | *see also the Mediawiki help page for links: https://www.mediawiki.org/wiki/Help:Links and the**help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages | + | **see also the Mediawiki help page for links: https://www.mediawiki.org/wiki/Help:Links and the**help section about external links to internal pages https://www.mediawiki.org/wiki/Help:Links#External_links_to_internal_pages |
− | *links with parameters / links that open in a new tab: <code><nowiki><span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki><nowiki></span></nowiki></code><!-- end slideexclude: --></div> | + | **links with parameters / links that open in a new tab: <code><nowiki><span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki><nowiki></span></nowiki></code><!-- end slideexclude: --></div> |
====Wiki external==== | ====Wiki external==== |