Log in / create account | Login with OpenID
DocForge
An Open Wiki For Software Developers

Help:Editing

From DocForge

(Difference between revisions)
m
(Added table)
Line 7: Line 7:
{|
{|
|-
|-
-
|'''Description'''
+
! Description
-
|'''You type'''
+
! You type
-
|'''You get'''
+
! You get
|-
|-
-
| colspan="3" | ''applies anywhere''
+
! colspan="3" style="padding-top:15px" | ''Applies anywhere:''
|-
|-
|Italic text
|Italic text
Line 29: Line 29:
|<nowiki>no ''markup''</nowiki>
|<nowiki>no ''markup''</nowiki>
|-
|-
-
| colspan="3" | ''only at the beginning of the line''
+
! colspan="3" style="padding-top:25px" | ''Applies only at the beginning of the line:''
|-
|-
|Headings of<br />different sizes
|Headings of<br />different sizes
Line 132: Line 132:
Mediawiki ignores normal line breaks. To start a new paragraph, leave an empty line. You can also start a newline with the HTML tag <tt><nowiki><br&nbsp;/></nowiki></tt>.   
Mediawiki ignores normal line breaks. To start a new paragraph, leave an empty line. You can also start a newline with the HTML tag <tt><nowiki><br&nbsp;/></nowiki></tt>.   
 +
 +
=== Tables ===
 +
 +
Basic table format:
 +
 +
<pre>
 +
{|
 +
|-
 +
! header 1
 +
! header 2
 +
! header 3
 +
|-
 +
| row 1, cell 1
 +
| row 1, cell 2
 +
| row 1, cell 3
 +
|-
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
|}
 +
</pre>
 +
 +
Produces:
 +
{|
 +
|-
 +
! header 1
 +
! header 2
 +
! header 3
 +
|-
 +
| row 1, cell 1
 +
| row 1, cell 2
 +
| row 1, cell 3
 +
|-
 +
| row 2, cell 1
 +
| row 2, cell 2
 +
| row 2, cell 3
 +
|}
 +
=== HTML ===
=== HTML ===

Revision as of 18:43, 15 March 2010

Section editing is turned off by default, but can be turned on in your user preferences.

Text formatting markup

You can format your text using wiki markup. This consists of normal characters like asterisks, single quotes or equation marks which have a special function in the wiki, sometimes depending on their position. For example, to format a word in italic, you include it in two single quotes like ''this''

Description You type You get
Applies anywhere:
Italic text ''italic'' italic
Bold text '''bold''' bold
Bold and italic '''''bold & italic''''' bold & italic
Escape wiki markup <nowiki>no ''markup''</nowiki> no ''markup''
Applies only at the beginning of the line:
Headings of
different sizes

==level 1==
===level 2===
====level 3====
=====level 4=====

Level 1

Level 2

Level 3

Level 4
Horizontal rule

----


Bullet list

* one
* two
* three
** three and one-third
** three and two-thirds

  • one
  • two
  • three
    • three and one-third
    • three and two-thirds
Numbered list

# one
# two
# three
## three point one
## three point two

  1. one
  2. two
  3. three
    1. three point one
    2. three point two
Mixture of bulleted
and numbered lists

# one
# two
#* two point one
#* two point two

  1. one
  2. two
    • two point one
    • two point two
Definition list

;Definition
:item 1
:item 2

Definition
item 1
item 2
Preformatted text

  preformatted text is done with
  a space at the
  beginning of the line

preformatted text is done with
a space at the 
beginning of the line

Code Syntax Highlighting

<code ['language'|list] [n] >source code here</code>

Simple example - <code php> echo "Hello World"; </code>

echo "Hello World";

With line numbers - <code php n> echo "Hello World"; </code>

  1. echo "Hello World";

Default code tag: <code> echo "Hello World"; </code>

echo "Hello World";

Supported languages: asp tcl cpp-qt caddcl nsis plsql fortran java5 tsql bnf ocaml-brief html4strict csharp sdlbasic actionscript c lisp vhdl oobas sql perl matlab ada cadlisp autoit cfm visualfoxpro xml apache lua thinbasic gml eiffel io latex javascript blitzbasic css applescript text php-brief cfdg d diff reg vb freebasic java inno objc ini smarty ocaml winbatch ruby pascal cpp scheme idl c_mac asm mysql smalltalk dos qbasic groovy bash python delphi robots div mirc sas vbnet mpasm php oracle8


Paragraphs

Mediawiki ignores normal line breaks. To start a new paragraph, leave an empty line. You can also start a newline with the HTML tag <br />.

Tables

Basic table format:

{|
|-
! header 1
! header 2
! header 3
|-
| row 1, cell 1
| row 1, cell 2
| row 1, cell 3
|-
| row 2, cell 1
| row 2, cell 2
| row 2, cell 3
|}

Produces:

header 1 header 2 header 3
row 1, cell 1 row 1, cell 2 row 1, cell 3
row 2, cell 1 row 2, cell 2 row 2, cell 3


HTML

Some HTML-Tags are allowed in MediaWiki, for example <code>, <div>, <span> and <font>.


Links

There are two types of supported links:

  1. internal links to other pages in the wiki
  2. external links to websites

To add an internal link, enclose the name of the page you want to link to in double square brackets. When you save the page, you'll see the new link pointing to your page. If the page exists already, it is displayed in blue, empty pages are displayed in red. Selflinks to the current page are not transformed in URLs but displayed in bold.

The first letter of the target page is automatically capitalized and spaces are represented as underscores (typing an underscore in the link will have a similar affect as typing a space, but is not recommended, since the underscore will also be shown in the text).

How to link

Description You type You get
Internal link [[Main Page]] Main Page
Piped link [[Main Page|different text]] different text
Anchor link [[#External links|Anchor link]] Anchor link
External link http://mediawiki.org http://mediawiki.org
External link,

different title

[http://mediawiki.org MediaWiki] MediaWiki
External link,

unnamed

[http://mediawiki.org] [1]
External link,

same host unnamed

[http://{{SERVERNAME}}/pagename] [2]
mailto unnamed [mailto:info@example.org] [3]
mailto named [mailto:info@example.org info] info
redirect #REDIRECT [[Main Page]] -> Main Page

See Also

DocForge:Templates