Difference between revisions of "SyntaxColoring"

From OOModels
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 12: Line 12:
<div class="code">
<div class="code">
  ...normal code...
  ...normal code...
  <span class="oogtemplatecode">...colorful include statement...</span>
  <span class="oogtemplatecode">...colorful statement...</span>
<div class="attribute">
<div class="attribute">
  ...colorful attribute block...
  ...colorful block...
</div>
</div>
</div>
</div>
Line 23: Line 23:
<div class="code">
<div class="code">
  ...normal code...
  ...normal code...
  <span class="oogtemplatecode">...colorful include statement...</span>
  <span class="oogtemplatecode">...colorful statement...</span>
<div class="attribute">
<div class="attribute">
  ...colorful attribute block...
  ...colorful block...
</div>
</div>
</div>
&lt;/div&gt;
</pre>

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...