Last edited 2 weeks ago
by Laetitia Huyghe

2.3 Wikitext editing

Redaktion (talk | contribs)
No edit summary
Tag: 2017 source edit
No edit summary
Tag: 2017 source edit
 
(12 intermediate revisions by 2 users not shown)
Line 40: Line 40:
|}</syntaxhighlight><section end="training-slide2" />
|}</syntaxhighlight><section end="training-slide2" />


 
=== Links / Embedded files ===
===Links / Embedded files===
<section begin="training-slide3" />
<section begin="training-slide3" />


Line 54: Line 53:
[https://wikipedia.org Wikipedia]
[https://wikipedia.org Wikipedia]
</syntaxhighlight>
</syntaxhighlight>
'''Link with parameters''
'''Link with parameters'''
<syntaxhighlight lang="text">
<syntaxhighlight lang="text">
<span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</span>
<span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</span>
Line 78: Line 77:
===Magic words===
===Magic words===
{| class="contenttable"
{| class="contenttable"
!Type of Wikitext
! style="" |Type of Wikitext
!Example
! style="" |Example
|-
|-
|Special character
| style="" |Special character
|'''<code>&amp;atilde;</code>  &rarr; &atilde;'''
| style="" |'''<code>&amp;atilde;</code>  &rarr; &atilde;'''
'''<code>&amp;ccedil;</code> &rarr; &ccedil;'''
'''<code>&amp;ccedil;</code> &rarr; &ccedil;'''


UTF-8 is possible
UTF-8 is possible
|-
|-
|Comment
| style="" |Comment
|<code>'''<nowiki><!-- unnoticed --></nowiki>'''</code>
| style="" |<code>'''<nowiki><!-- unnoticed --></nowiki>'''</code>
|-
|-
|No "wiki translation"
| style="" |No "wiki translation"
|<code>'''&lt;nowiki'''&gt;</code> and <code>'''</pre'''></code>
| style="" |<code>'''&lt;nowiki'''&gt;</code> and <code>'''</pre'''></code>
|-
|-
|Table of contents
| style="" |Table of contents
|<code>'''<nowiki>__TOC__</nowiki>'''</code> and <code>'''<nowiki>__NOTOC__</nowiki>'''</code>
| style="" |<code>'''<nowiki>__TOC__</nowiki>'''</code> and <code>'''<nowiki>__NOTOC__</nowiki>'''</code>
|-
|-
|Signature
| style="" |Signature
|<code>'''<nowiki>--~~~</nowiki>'''</code>
| style="" |<code>'''<nowiki>--~~~</nowiki>'''</code>
|-
|-
|Redirect
| style="" |Redirect
|<code>'''<nowiki>#REDIRECT [[targetpage]]</nowiki>'''</code>
| style="" |<code>'''<nowiki>#REDIRECT [[targetpage]]</nowiki>'''</code>
|-
|-
|Template
| style="" |Template
|<code>'''<nowiki>{{template name}}</nowiki>'''</code>
| style="" |<code>'''<nowiki>{{template name}}</nowiki>'''</code>
|}
|}
<section end="wikitextTraining" />
<section end="wikitextTraining" />


Other magic words are available [[Manual:MagicWords|via this link]].


==Download Wikitext reference==
== HTML tags ==
Some html tags can be used in wikitext. The paragraph and character formatting tags in particular are useful for formatting templates or pages, but are not usually required for creating and editing a page itself.


<span class="bi bi-box-arrow-down" style="color:#3e5389"></span>[[Media:Manual:Manual Wikitext Wikitext reference.pdf|'''Wikitext reference''']]
=== <span style="color: rgb(0, 0, 0)">Allowed tags</span> ===


* <span style="color: rgb(0, 0, 0)">Paragraph and character formatting: <nowiki><div>, <span>, <p>, <br></nowiki>, <nowiki><hr></nowiki></span>
* <span style="color: rgb(0, 0, 0)">Table formatting: <nowiki><table>, <tr></nowiki>,<nowiki><td></nowiki>, <nowiki><th></nowiki></span>
* <span style="color: rgb(0, 0, 0)">Headings: <nowiki><h1>, <h2></nowiki></span>


Complete overview: https://www.mediawiki.org/wiki/Help:HTML_in_wikitext/de
=== <span style="color: rgb(0, 0, 0)">Not allowed tags</span> ===
* <span style="color: rgb(0, 0, 0)">Classic html tags are not allowed, like <a>, <img>, <script>, <form>, <fieldset>, and structural tgas like <head> or  <title>.</span>
== Help pages for source code editing ==
As most of the source code editing functions - such as formatting with wikitext - originate directly from MediaWiki, these functions are documented on mediawiki.org. Below you will find a selection of help pages on the subject of source text editing:
{| class="wikitable" style="width:100%;"
! style="width:200px;" |Topic
! style="" |Help page
|-
| style="width:200px;" |Wikitext
| style="" |General information on formatting with Wikitext
https://www.mediawiki.org/wiki/Help:Formatting
|-
| style="width:200px;" |Links
| style="" |Include links
https://www.mediawiki.org/wiki/Help:Links
|-
| style="width:200px;" |Bilder
| style="" |Include images
https://www.mediawiki.org/wiki/Help:Images
|-
| style="width:200px;" |Magic words
| style="" |Magic words are text strings that Mediawiki links to a return value or a function. These are also an example of wikitext.
https://www.mediawiki.org/wiki/Help:Magic_words
|-
| style="width:200px;" |Parser-Funktionen
| style="" |Parser functions can be used to insert simple logical queries, e.g. in templates.
https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions
|-
| style="" |Semantic MediaWiki
| style="" |Parser functions: https://www.semantic-mediawiki.org/wiki/Help:Parser_functions
Properties: https://www.semantic-mediawiki.org/wiki/Help:Property_declaration
|}


{{Box Links-en
{{Box Links-en
|Topic1=[https://meta.wikimedia.org/wiki/Help:Wikitext_examples meta.wikimedia.org/wiki/Help:Wikitext_examples]
|Topic1=https://meta.wikimedia.org/wiki/Help:Wikitext_examples
|Topic2=[[Manual:MagicWords|Magic words]]}}
|Topic2=https://www.mediawiki.org/wiki/Help:HTML_in_wikitext
|Topic3=[[Manual:MagicWords|Magic words]]
|Topic4=[[Manual:Wikitext/Wikitext_reference|Wikitext reference]]}}
 


[[en:{{FULLPAGENAME}}]]
[[de:Handbuch:Wikitext]]
[[de:Wikitext]]
[[Category:Editing]]
[[Category:Editing]]
[[Category:Concept]]
[[Category:Concept]]

Latest revision as of 12:54, 23 May 2025

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 text or other data.

How do I use Wikitext?

When you edit a page, you can switch between visual editing and source editing using the editor toolbar.

Screenshot: Visual Editor switch edit mode

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.

Examples of Wikitext

Here are some typical examples of Wikitext:

Text formatting

  • This is '''bold'''
  • This is ''italic''
  • This is <u>underlined</u>

Structuring

  • This is a ==Heading==
  • This is an *unordered list element
  • Table:
    {| class="wikitable"
    |-
    !header 1
    !header 2
    |-
    |row 1, cell 1
    |row 1, cell 2
    |-
    |row 2, cell 1
    |row 2, cell 2
    |}
    

Links / Embedded files

Link to internal wiki page

[[Wikipage|Label]]
[[Pancake|Best Pancake]]

Link to external website

[url label]
[https://wikipedia.org Wikipedia]

Link with parameters

<span class="plainlinks">[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</span>

This link opens the referenced page in edit mode in a new tab.

Embed image/file


  • [[Datei:image-or-pdf-name.png]] - - - Image/PDF is embedded on page
    • the wiki checks, if a preview can be generated (e.g., for "png", "jpeg", "gif", "svg") and embeds the preview
    • otherwise, a link to the file description page is created
      • can be embedded: PDF, Tiff (with extension)
      • cannot be embedded: Microsoft Office- und Libre Office-Dateien; Shell-Skripte, ...
  • [[Media:image-or-pdf--name.png]] - - - - Links to image / PDF
  • [[:Datei:image-or-pdf--name.png]] - - - Links to file description page

Magic words

Type of Wikitext Example
Special character &atilde; → ã

&ccedil; → ç

UTF-8 is possible

Comment <!-- unnoticed -->
No "wiki translation" <nowiki> and </pre>
Table of contents __TOC__ and __NOTOC__
Signature --~~~
Redirect #REDIRECT [[targetpage]]
Template {{template name}}

Other magic words are available via this link.

HTML tags

Some html tags can be used in wikitext. The paragraph and character formatting tags in particular are useful for formatting templates or pages, but are not usually required for creating and editing a page itself.

Allowed tags

  • Paragraph and character formatting: <div>, <span>, <p>, <br>, <hr>
  • Table formatting: <table>, <tr>,<td>, <th>
  • Headings: <h1>, <h2>

Complete overview: https://www.mediawiki.org/wiki/Help:HTML_in_wikitext/de

Not allowed tags

  • Classic html tags are not allowed, like <a>, <img>, <script>, <form>, <fieldset>, and structural tgas like <head> or <title>.

Help pages for source code editing

As most of the source code editing functions - such as formatting with wikitext - originate directly from MediaWiki, these functions are documented on mediawiki.org. Below you will find a selection of help pages on the subject of source text editing:

Topic Help page
Wikitext General information on formatting with Wikitext

https://www.mediawiki.org/wiki/Help:Formatting

Links Include links

https://www.mediawiki.org/wiki/Help:Links

Bilder Include images

https://www.mediawiki.org/wiki/Help:Images

Magic words Magic words are text strings that Mediawiki links to a return value or a function. These are also an example of wikitext.

https://www.mediawiki.org/wiki/Help:Magic_words

Parser-Funktionen Parser functions can be used to insert simple logical queries, e.g. in templates.

https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions

Semantic MediaWiki Parser functions: https://www.semantic-mediawiki.org/wiki/Help:Parser_functions

Properties: https://www.semantic-mediawiki.org/wiki/Help:Property_declaration

Related info



PDF exclude - start

To submit feedback about this documentation, visit our community forum.

PDF exclude - end