Loading...

Advanced uses of the Wiki

The Wiki is powerful, and this page summarises help and information for advanced topics in Wiki formatting and use. See the Table of Contents on the right to jump to the section of interest.

Using HTML in Wiki Text

Trac supports inserting HTML into any wiki context.

To inform the wiki engine that a block of text should be treated as HTML, use the html processor.

This example should explain:

{{{
#!html
<h1 style="text-align: right; color: blue">HTML Test</h1>
}}}

Results in:

HTML Test

Using wiki markup inside HTML

It is also possible to wrap some wiki markup inside a HTML container. The markup provides two special processors / macros to do this - essentially making <span> and <div> containers. Here are examples of both:

This is some [[span(Red, style=color:red)]] text.

Results in:

This is some Red text.

To make a div container:

{{{
#!div class=important
This is some '''very''' important to-do items:
 * Remember to read more Help pages.
 * Check out #1.
}}}

Results in:

This is some very important to-do items:

  • Remember to read more Help pages.
  • Check out #1.