close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of WikiProcessors


Ignore:
Timestamp:
Jul 14, 2008, 10:28:18 AM (16 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiProcessors

    v1 v2  
    11= Wiki Processors =
    22
    3 Processors are [TracWikiMacros wiki macros] designed to provide alternative markup formats for the [TracWiki Wiki engine]. Processors can be thought of as ''macro functions to process user-edited text''.
     3Processors are WikiMacros designed to provide alternative markup formats for the [TracWiki Wiki engine]. Processors can be thought of as ''macro functions to process user-edited text''.
    44
    55The Wiki engine uses processors to allow using [wiki:WikiRestructuredText Restructured Text], [wiki:WikiHtml raw HTML] and [http://www.textism.com/tools/textile/ textile] in any Wiki text throughout Trac.
     
    2525<h1 style="color: orange">This is raw HTML</h1>
    2626}}}
     27
     28Note 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).
    2729
    2830----
     
    8183The following processors are included in the Trac distribution:
    8284 * '''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.
    8387 * '''rst''' -- Trac support for Restructured Text. See WikiRestructuredText.
    84  * '''textile''' -- Supported if  [http://dealmeida.net/projects/textile/ Textile] is installed. See [http://hobix.com/textile/ a Textile reference].
     88 * '''textile''' -- Supported if [http://cheeseshop.python.org/pypi/textile Textile] is installed. See [http://www.textism.com/tools/textile/ a Textile reference].
    8589 * '''comment''' -- Do not process the text in this section (i.e. contents exist only in the plain text - not in the rendered page).
    86 
    87 Textile link above is rotten. [http://www.textism.com/tools/textile/ this one] works, allows to test example. To install, download from [http://cheeseshop.python.org/pypi/textile] and run `python setup.py install`.
    8890
    8991=== Code Highlighting Support ===
     
    9597 * '''ruby''' -- Ruby
    9698 * '''php''' -- PHP
    97  * '''asp''' --- ASP
     99 * '''asp''' -- ASP
     100 * '''java''' -- Java
     101 * '''js''' -- Javascript
    98102 * '''sql''' -- SQL
    99103 * '''xml''' -- XML
    100104 * '''sh''' -- Bourne/Bash shell
     105
    101106'''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.''
    102107
     
    109114}}}
    110115
    111 The result will be syntax highlighted HTML code. The same is valid for all other mime types supported.
     116The result will be syntax highlighted HTML code:
     117{{{
     118#!text/html
     119<h1>text</h1>
     120}}}
     121
     122The same is valid for all other mime types supported.
    112123
    113124
    114125For more processor macros developed and/or contributed by users, visit:
    115  * [http://trac.edgewall.org/wiki/ProcessorBazaar ProcessorBazaar]
    116  * [http://trac.edgewall.org/wiki/MacroBazaar MacroBazaar]
     126 * [trac:ProcessorBazaar]
     127 * [trac:MacroBazaar]
     128 * [th:WikiStart Trac Hacks] community site
    117129
    118130
    119131== Advanced Topics: Developing Processor Macros ==
    120 Developing processors is no different from [TracWikiMacros wiki macros]. In fact they work the same way, only the usage syntax differs.
     132Developing processors is no different from Wiki macros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information.
    121133
    122 '''Example:''' (''Restructured Text Processor''):
    123 {{{
    124 #!python
    125 from docutils.core import publish_string
    126 
    127 def execute(hdf, text, env):
    128     html = publish_string(text, writer_name = 'html')
    129     return html[html.find('<body>')+6:html.find('</body>')].strip()
    130 }}}
    131134
    132135----
    133 See also: TracWikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide
     136See also: WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide