Difference between revisions of "SyntaxColoring"

From OOModels
Jump to navigationJump to search
(New page: If you mark your code with ''span'' or ''div'' tags, you can apply syntax coloring to it. The DownloadManager recognises these tags and removes them from your code before sending it t...)
 
 
(4 intermediate revisions by the same user not shown)
Line 4: Line 4:


See [[Mediawiki:Monobook.css]] for currently defined styles. If you want to add a style, say so in the talk page.
See [[Mediawiki:Monobook.css]] for currently defined styles. If you want to add a style, say so in the talk page.
===Example===
Your code might look like this:
<pre>
&lt;div class="code"&gt;
...normal code...
&lt;span class="oogtemplatecode"&gt;...colorful statement...&lt;/span&gt;
&lt;div class="attribute"&gt;
...colorful block...
&lt;/div&gt;
&lt;/div&gt;
</pre>
and is rendered like that:
<div class="code">
...normal code...
<span class="oogtemplatecode">...colorful statement...</span>
<div class="attribute">
...colorful block...
</div>
</div>

Latest revision as of 13:35, 8 July 2008

If you mark your code with span or div tags, you can apply syntax coloring to it.

The DownloadManager recognises these tags and removes them from your code before sending it to the downloading client.

See Mediawiki:Monobook.css for currently defined styles. If you want to add a style, say so in the talk page.

Example[edit]

Your code might look like this:

<div class="code">
 ...normal code...
 <span class="oogtemplatecode">...colorful statement...</span>
<div class="attribute">
 ...colorful block...
</div>
</div>

and is rendered like that:

...normal code...
...colorful statement...
...colorful block...