Help:Editing: Difference between revisions

Help page
(new GeSHi tag syntaxhighlight)
Line 249: Line 249:
Some [[HTML]] tags are allowed in MediaWiki, for example <tt>&lt;div&gt;</tt>, <tt>&lt;span&gt;</tt> and <tt>&lt;font&gt; </tt>.
Some [[HTML]] tags are allowed in MediaWiki, for example <tt>&lt;div&gt;</tt>, <tt>&lt;span&gt;</tt> and <tt>&lt;font&gt; </tt>.


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


<source lang="c" line start="55" highlight="4">
<syntaxhighlight lang="c" line start="55" highlight="4">
// Global variable
// Global variable
int x = 7;
int x = 7;
Line 260: Line 260:
  return (a + b);
  return (a + b);
}
}
</source>
</syntaxhighlight>


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: