Difference between revisions of "SyntaxColoring"

From OOModels
Jump to navigationJump to search
Line 12: Line 12:
<div class="code">
<div class="code">
  ...normal code...
  ...normal code...
  <span class="templateinsert">...colorful include statement...</span>
  <span class="oogtemplatecode">...colorful include statement...</span>
<div class="attribute">
<div class="attribute">
  ...colorful attribute block...
  ...colorful attribute block...

Revision as of 13:34, 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 include statement...</span>
<div class="attribute">
 ...colorful attribute block...
</div>
</div>

and is rendered like that:

...normal code...
...colorful include statement...
...colorful attribute block...

</div>