Changes between Version 5 and Version 6 of WikiProcessors


Ignore:
Timestamp:
01/24/11 13:44:25 (15 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiProcessors

    v5 v6  
    1  
    21= Wiki Processors = 
    32 
     
    1413 
    1514{{{ 
     15{{{ 
    1616#!html 
    17 <pre class="wiki">{{{ 
    18 #!html 
    19 &lt;h1 style="color: orange"&gt;This is raw HTML&lt;/h1&gt; 
    20 }}}</pre> 
     17<h1 style="color: orange">This is raw HTML</h1> 
     18}}} 
    2119}}} 
    2220 
     
    2725}}} 
    2826 
     27Note that since 0.11, such blocks of HTML have to be self-contained, i.e. you can't start an HTML element in one block and close it later in a second block. Use div or span processors for achieving similar effect (see WikiHtml). 
     28 
    2929---- 
    3030 
     
    3232 
    3333{{{ 
    34 #!html 
    35 <pre class="wiki">{{{ 
     34{{{ 
    3635#!rst 
    3736A header 
     
    4039 
    4140.. [*] This is the footnote. 
    42 }}}</pre> 
     41}}} 
    4342}}} 
    4443 
     
    5655 
    5756{{{ 
    58 #!html 
    59 <pre class="wiki">{{{ 
     57{{{ 
    6058#!c 
    6159int main(int argc, char *argv[]) 
     
    6462  return 0; 
    6563} 
    66 }}}</pre> 
     64}}} 
    6765}}} 
    6866 
     
    7876 
    7977---- 
     78'''Example 4''' (''Searching from a wiki page by custom field. Allows user to reuse most common searches on a wiki page''): 
     79 
     80{{{ 
     81{{{ 
     82#!html 
     83<form action="/query" method="get"> 
     84<input type="text" name="keywords" value="~" size="30"> <input type="submit" value="Search by Keywords#"> 
     85<!-- To control what fields show up use hidden fields 
     86<input type="hidden" name="col" value="id"> 
     87<input type="hidden" name="col" value="summary"> 
     88<input type="hidden" name="col" value="status"> 
     89<input type="hidden" name="col" value="milestone"> 
     90<input type="hidden" name="col" value="version"> 
     91<input type="hidden" name="col" value="owner"> 
     92<input type="hidden" name="col" value="priority"> 
     93<input type="hidden" name="col" value="component"> 
     94--> 
     95</form> 
     96}}} 
     97}}} 
     98 
     99 
     100''' Result:''' 
     101{{{ 
     102#!html 
     103<form action="/query" method="get"> 
     104<input type="text" name="keywords" value="~" size="30"> <input type="submit" value="Search by Keywords#"> 
     105<!-- To control what fields show up use hidden fields 
     106<input type="hidden" name="col" value="id"> 
     107<input type="hidden" name="col" value="summary"> 
     108<input type="hidden" name="col" value="status"> 
     109<input type="hidden" name="col" value="milestone"> 
     110<input type="hidden" name="col" value="version"> 
     111<input type="hidden" name="col" value="owner"> 
     112<input type="hidden" name="col" value="priority"> 
     113<input type="hidden" name="col" value="component"> 
     114--> 
     115</form> 
     116}}} 
     117 
     118 
     119---- 
    80120 
    81121== Available Processors == 
    82122The following processors are included in the Trac distribution: 
    83123 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml. 
     124 * '''div''' -- Wrap an arbitrary Wiki content in a <div> element (''since 0.11''). See WikiHtml. 
     125 * '''span''' -- Wrap an arbitrary Wiki content in a <span> element (''since 0.11''). See also WikiHtml. 
    84126 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText. 
    85  * '''textile''' -- Supported if  [http://dealmeida.net/projects/textile/ Textile] is installed. See [http://hobix.com/textile/ a Textile reference]. 
    86  
    87 Textile link above is rotten. [http://www.textism.com/tools/textile/ this one] works, allows to test example. 
     127 * '''textile''' -- Supported if [http://cheeseshop.python.org/pypi/textile Textile] is installed. See [http://www.textism.com/tools/textile/ a Textile reference]. 
     128 * '''comment''' -- Do not process the text in this section (i.e. contents exist only in the plain text that can be viewed when editing the wiki page content - not in the rendered page). 
     129 * '''diff''' -- Pretty print patches and diffs. 
    88130 
    89131=== Code Highlighting Support === 
     
    91133 * '''c''' -- C 
    92134 * '''cpp''' -- C++ 
     135 * '''csharp''' --- C# 
    93136 * '''python''' -- Python 
    94137 * '''perl''' -- Perl 
    95138 * '''ruby''' -- Ruby 
    96139 * '''php''' -- PHP 
    97  * '''asp''' --- ASP 
     140 * '''asp''' -- ASP 
     141 * '''java''' -- Java 
     142 * '''js''' -- Javascript 
    98143 * '''sql''' -- SQL 
    99144 * '''xml''' -- XML 
     145 * '''sh''' -- Bourne/Bash shell 
     146 
    100147'''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.'' 
    101148 
     
    108155}}} 
    109156 
    110 The result will be syntax highlighted HTML code. The same is valid for all other mime types supported. 
     157The result will be syntax highlighted HTML code: 
     158{{{ 
     159#!text/html 
     160<h1>text</h1> 
     161}}} 
     162 
     163The same is valid for all other [TracSyntaxColoring#SyntaxColoringSupport mime types supported]. 
    111164 
    112165 
    113166For more processor macros developed and/or contributed by users, visit:  
    114  * [http://projects.edgewall.com/trac/wiki/ProcessorBazaar ProcessorBazaar] 
    115  * [http://projects.edgewall.com/trac/wiki/MacroBazaar MacroBazaar] 
     167 * [trac:ProcessorBazaar] 
     168 * [trac:MacroBazaar] 
     169 * [th:WikiStart Trac Hacks] community site 
    116170 
    117171 
    118172== Advanced Topics: Developing Processor Macros == 
    119 Developing processors is no different from WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information. 
     173Developing processors is no different from Wiki macros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information. 
    120174 
    121 '''Example:''' (''Restructured Text Processor''): 
    122 {{{ 
    123 #!python 
    124 from docutils.core import publish_string 
    125  
    126 def execute(hdf, text, env): 
    127     html = publish_string(text, writer_name = 'html') 
    128     return html[html.find('<body>')+6:html.find('</body>')].strip() 
    129 }}} 
    130175 
    131176----