Changes between Version 1 and Version 2 of WikiProcessors


Ignore:
Timestamp:
09/10/09 19:34:29 (15 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiProcessors

    v1 v2  
    2525<h1 style="color: orange">This is raw HTML</h1>
    2626}}}
    27 
    28 Note 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).
    2927
    3028----
     
    8381The following processors are included in the Trac distribution:
    8482 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml.
    85  * '''div''' -- Wrap an arbitrary Wiki content in a <div> element (''since 0.11''). See WikiHtml.
    86  * '''span''' -- Wrap an arbitrary Wiki content in a <span> element (''since 0.11''). See also WikiHtml.
    8783 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText.
    88  * '''textile''' -- Supported if [http://cheeseshop.python.org/pypi/textile Textile] is installed. See [http://www.textism.com/tools/textile/ a Textile reference].
    89  * '''comment''' -- Do not process the text in this section (i.e. contents exist only in the plain text - not in the rendered page).
     84 * '''textile''' -- Supported if  [http://dealmeida.net/projects/textile/ Textile] is installed. See [http://hobix.com/textile/ a Textile reference].
     85
     86Textile link above is rotten. [http://www.textism.com/tools/textile/ this one] works, allows to test example.
    9087
    9188=== Code Highlighting Support ===
     
    9794 * '''ruby''' -- Ruby
    9895 * '''php''' -- PHP
    99  * '''asp''' -- ASP
    100  * '''java''' -- Java
    101  * '''js''' -- Javascript
     96 * '''asp''' --- ASP
    10297 * '''sql''' -- SQL
    10398 * '''xml''' -- XML
    104  * '''sh''' -- Bourne/Bash shell
    105 
    10699'''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.''
    107100
     
    114107}}}
    115108
    116 The result will be syntax highlighted HTML code:
    117 {{{
    118 #!text/html
    119 <h1>text</h1>
    120 }}}
    121 
    122 The same is valid for all other mime types supported.
     109The result will be syntax highlighted HTML code. The same is valid for all other mime types supported.
    123110
    124111
    125112For more processor macros developed and/or contributed by users, visit:
    126  * [trac:ProcessorBazaar]
    127  * [trac:MacroBazaar]
    128  * [th:WikiStart Trac Hacks] community site
     113 * [http://projects.edgewall.com/trac/wiki/ProcessorBazaar ProcessorBazaar]
     114 * [http://projects.edgewall.com/trac/wiki/MacroBazaar MacroBazaar]
    129115
    130116
    131117== Advanced Topics: Developing Processor Macros ==
    132 Developing processors is no different from Wiki macros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information.
     118Developing processors is no different from WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information.
    133119
     120'''Example:''' (''Restructured Text Processor''):
     121{{{
     122#!python
     123from docutils.core import publish_string
     124
     125def execute(hdf, text, env):
     126    html = publish_string(text, writer_name = 'html')
     127    return html[html.find('<body>')+6:html.find('</body>')].strip()
     128}}}
    134129
    135130----