Help:Editing: Difference between revisions

Help page
m (Source Plugin)
Line 212: Line 212:
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <tt><nowiki><div></nowiki></tt>, <tt><nowiki><span></nowiki></tt> and <tt><nowiki><font></nowiki></tt>.
Some [[wikipedia:HTML|HTML]] tags are allowed in MediaWiki, for example <tt><nowiki><div></nowiki></tt>, <tt><nowiki><span></nowiki></tt> and <tt><nowiki><font></nowiki></tt>.


If you want to use <tt><nowiki><code></nowiki></tt>, you should use <tt>&lt;source&gt;</tt> instead! It supports Syntax Coloring. You can also specify a language, eg. <tt>&lt;source lang="c"&gt;</tt> :
If you want to use <tt><nowiki><code></nowiki></tt>, you should use <tt>&lt;source&gt;</tt> instead! It supports Syntax Coloring. You can also specify a language, eg. <tt>&lt;source lang="c" line start="55" highlight="4" enclose="div"&gt;</tt> :


<source lang="c" line start="0" highlight="4" enclose="div">
<source lang="c" line start="55" highlight="4" enclose="div">
// Global variable
// Global variable
int x = 7;
int x = 7;
Line 227: Line 227:
Please see the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi MediaWiki GeSHi Page] for detailed information to use some of the parameters:
Please see the [http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi MediaWiki GeSHi Page] for detailed information to use some of the parameters:


* enclose="div": enables indentation with 4 spaces
* enclose="div": ''enables indentation with 4 spaces''
* lang="xyz": ''defines the language'', eg. "c", "php", ...
* lang="xyz": ''defines the language'', eg. "c", "php", ...
* line: ''show line numbering''
* line: ''show line numbering''