Help:WikiHtml
- Version 1
- 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. |
+ | The wiki supports inserting HTML into any wiki context.
|
---|---|---|---|---|
2 | - | + | ||
3 | - | HTML support is built-in, and does not require installing any additional packages. |
+ | HTML support is built-in, and does not require installing any additional packages.
|
4 | - | + | ||
5 | - | == How to Use HTML == |
+ | == How to Use HTML ==
|
6 | - | To inform the wiki engine that a block of text should be treated as HTML, use the ''html'' processor. |
+ | |
7 | - | + | To inform the wiki engine that a block of text should be treated as HTML, use the ''html'' processor.
|
|
8 | - | This example should explain: |
+ | |
9 | - | {{{ |
+ | This example should explain:
|
10 | - | + | ||
11 | - | + | {{{
|
|
12 | - | #!html |
+ | {{{#!html
|
13 | - | + | <h1 style="text-align: right; color: blue">HTML Test</h1>
|
|
14 | - | }}} |
+ | }}}
|
15 | - | }}} |
+ | }}}
|
16 | - | + | ||
17 | - | Results in: |
+ | Results in:
|
18 | - | {{{ |
+ | |
19 | - | #!html |
+ | {{{#!html
|
20 | - | <h1 style="text-align: right; color: blue">HTML Test</h1> |
+ | <h1 style="text-align: right; color: blue">HTML Test</h1>
|
21 | - | }}} |
+ | }}}
|
22 | - | + | ||
23 | - | Note that |
+ | 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 |
+ | #!html
|
28 | - | + | <div class=warning style="border: 2pt solid; text-align: center">
|
|
29 | - | This is the ''only'' way to go. |
+ | This is the ''only'' way to go in Trac 0.11
|
30 | - | + | </div>
|
|
31 | - | }}} |
+ | }}}
|
32 | - | }}} |
+ | }}}
|
33 | - | + | ||
34 | - | Results in: |
+ | Results in:
|
35 | - | {{{ |
+ | |
36 | - | #!html |
+ | {{{
|
37 | - | <div class=warning style="border: 2pt solid; text-align: center"> |
+ | #!html
|
38 | - | This is the ''only'' way to go. |
+ | <div class=warning style="border: 2pt solid; text-align: center">
|
39 | - | </div> |
+ | This is the ''only'' way to go in Trac 0.11
|
40 | - | }}} |
+ | </div>
|
41 | - | + | }}}
|
|
42 | - | For spans, you should rather use the Macro call syntax: |
+ | |
43 | - | {{{ |
+ | For spans, you should rather use the Macro call syntax:
|
44 | - | Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]! |
+ | |
45 | - | }}} |
+ | {{{
|
46 | - | + | Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]!
|
|
47 | - | Results in: |
+ | }}}
|
48 | - | Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]! |
+ | |
49 | - | + | Results in:
|
|
50 | - | + | ||
51 | - | == More Information == |
+ | Hello [[span(''WORLD'' (click [#world-anchor here]), style=color: green; font-size: 120%, id=world-anchor)]]!
|
52 | - | + | ||
53 | - | * http://www.w3.org/ -- World Wide Web Consortium |
+ | |
54 | - | * http://www.w3.org/MarkUp/ -- HTML Markup Home Page |
+ | == 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] |