| 1 | = Wiki Processors = |
| 2 | Processors are WikiMacros designed to provide alternative markup formats for the Trac Wiki engine. Processors can be thought of as ''macro functions to process user-edited text''. |
| 3 | |
| 4 | The wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text] and [wiki:WikiHtml raw HTML] in any wiki text throughout Trac. |
| 5 | |
| 6 | == Using Processors == |
| 7 | To use a processor on a block of text, use a wiki blockquote, selecting a processor by name using 'hashbang notation' (#!), familiar to most UNIX users from scripts. |
| 8 | |
| 9 | '''Example 1''' (''inserting raw HTML in a wiki text''): |
| 10 | |
| 11 | {{{ |
| 12 | #!html |
| 13 | <pre class="wiki">{{{ |
| 14 | #!html |
| 15 | <h1 style="color: orange">This is raw HTML</h1> |
| 16 | }}}</pre> |
| 17 | }}} |
| 18 | |
| 19 | '''Results in:''' |
| 20 | {{{ |
| 21 | #!html |
| 22 | <h1 style="color: orange">This is raw HTML</h1> |
| 23 | }}} |
| 24 | |
| 25 | ---- |
| 26 | |
| 27 | '''Example 2''' (''inserting Restructured Text in wiki text''): |
| 28 | |
| 29 | {{{ |
| 30 | #!html |
| 31 | <pre class="wiki">{{{ |
| 32 | #!rst |
| 33 | A header |
| 34 | -------- |
| 35 | This is some **text** with a footnote [*]_. |
| 36 | |
| 37 | .. [*] This is the footnote. |
| 38 | }}}</pre> |
| 39 | }}} |
| 40 | |
| 41 | '''Results in:''' |
| 42 | {{{ |
| 43 | #!rst |
| 44 | A header |
| 45 | -------- |
| 46 | This is some **text** with a footnote [*]_. |
| 47 | |
| 48 | .. [*] This is the footnote. |
| 49 | }}} |