Help: Wiki HTML

Version
by (unknown)
Version 2
by (unknown)

Deletions or items before changed

Additions or items after changed

1 -
 
+
The wiki supports inserting HTML into any wiki context.
2 +
3 +
HTML support is built-in, and does not require installing any additional packages.
4 +
5 +
== How to Use HTML ==
6 +
7 +
To inform the wiki engine that a block of text should be treated as HTML, use the ''html'' processor.
8 +
9 +
This example should explain:
10 +
11 +
{{{
12 +
{{{#!html
13 +
<h1 style="text-align: right; color: blue">HTML Test</h1>
14 +
}}}
15 +
}}}
16 +
17 +
Results in:
18 +
19 +
{{{#!html
20 +
<h1 style="text-align: right; color: blue">HTML Test</h1>
21 +
}}}
22 +
23 +
Note that Trac sanitizes your HTML code before displaying it. That means that if you try to use potentially dangerous constructs such as Javascript event handlers, those will be removed from the output.
24 +
25 +
{{{
26 +
{{{
27 +
#!html
28 +
<div class=warning style="border: 2pt solid; text-align: center">
29 +
This is the ''only'' way to go in Trac 0.11
30 +
</div>
31 +
}}}
32 +
}}}
33 +
34 +
Results in:
35 +
36 +
{{{
37 +
#!html
38 +
<div class=warning style="border: 2pt solid; text-align: center">
39 +
This is the ''only'' way to go in Trac 0.11
40 +
</div>
41 +
}}}
42 +
43 +
For spans, you should rather use the Macro call syntax:
44 +
45 +
{{{
46 +
Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]!
47 +
}}}
48 +
49 +
Results in:
50 +
51 +
Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]!
52 +
53 +
54 +
== More Information ==
55 +
56 +
* http://www.w3.org/ -- World Wide Web Consortium
57 +
* http://www.w3.org/MarkUp/ -- HTML Markup Home Page
58 +
59 +
----
60 +
See also: [Help:WikiFormatting Wiki Formatting], [Help:WikiMacros Wiki Macros]