Changes between Version 1 and Version 2 of WikiProcessors
- Timestamp:
- 2007-12-19T17:55:53Z (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiProcessors
v1 v2 1 1 = Wiki Processors = 2 2 3 Processors are WikiMacrosdesigned to provide alternative markup formats for the [TracWiki Wiki engine]. Processors can be thought of as ''macro functions to process user-edited text''.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''. 4 4 5 5 The 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. … … 81 81 The following processors are included in the Trac distribution: 82 82 * '''html''' -- Insert custom HTML in a wiki page. See WikiHtml. 83 * '''div''' -- Wrap an arbitrary Wiki content in a <div> element (''since 0.11''). See WikiHtml. 83 84 * '''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]. 85 86 Textile link above is rotten. [http://www.textism.com/tools/textile/ this one] works, allows to test example. 85 * '''textile''' -- Supported if [http://cheeseshop.python.org/pypi/textile Textile] is installed. See [http://www.textism.com/tools/textile/ a Textile reference]. 86 * '''comment''' -- Do not process the text in this section (i.e. contents exist only in the plain text - not in the rendered page). 87 87 88 88 === Code Highlighting Support === … … 97 97 * '''sql''' -- SQL 98 98 * '''xml''' -- XML 99 * '''sh''' -- Bourne/Bash shell 99 100 '''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.'' 100 101 … … 111 112 112 113 For more processor macros developed and/or contributed by users, visit: 113 * [http:// projects.edgewall.com/trac/wiki/ProcessorBazaar ProcessorBazaar]114 * [http:// projects.edgewall.com/trac/wiki/MacroBazaar MacroBazaar]114 * [http://trac.edgewall.org/wiki/ProcessorBazaar ProcessorBazaar] 115 * [http://trac.edgewall.org/wiki/MacroBazaar MacroBazaar] 115 116 116 117 117 118 == Advanced Topics: Developing Processor Macros == 118 Developing processors is no different from WikiMacros. In fact they work the same way, only the usage syntax differs. See WikiMacros for more information.119 Developing processors is no different from [TracWikiMacros wiki macros]. In fact they work the same way, only the usage syntax differs. 119 120 120 '''Example:''' (''Restructured Text Processor''):121 {{{122 #!python123 from docutils.core import publish_string124 125 def execute(hdf, text, env):126 html = publish_string(text, writer_name = 'html')127 return html[html.find('<body>')+6:html.find('</body>')].strip()128 }}}129 121 130 122 ---- 131 See also: WikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide123 See also: TracWikiMacros, WikiHtml, WikiRestructuredText, TracSyntaxColoring, WikiFormatting, TracGuide