Changes between Version 1 and Version 2 of WikiProcessors
- Timestamp:
- May 15, 2010, 9:05:30 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiProcessors
v1 v2 25 25 <h1 style="color: orange">This is raw HTML</h1> 26 26 }}} 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). 27 29 28 30 ---- … … 81 83 The following processors are included in the Trac distribution: 82 84 * '''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. 87 * '''htmlcomment''' -- Insert an HTML comment in a wiki page (''since 0.12''). See WikiHtml. 83 88 * '''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. 89 * '''textile''' -- Supported if [http://cheeseshop.python.org/pypi/textile Textile] is installed. See [http://www.textism.com/tools/textile/ a Textile reference]. 90 * '''comment''' -- Do not process the text in this section (i.e. contents exist only in the plain text - not in the rendered page). 87 91 88 92 === Code Highlighting Support === … … 94 98 * '''ruby''' -- Ruby 95 99 * '''php''' -- PHP 96 * '''asp''' --- ASP 100 * '''asp''' -- ASP 101 * '''java''' -- Java 102 * '''js''' -- Javascript 97 103 * '''sql''' -- SQL 98 104 * '''xml''' -- XML 105 * '''sh''' -- Bourne/Bash shell 106 99 107 '''Note:''' ''Trac relies on external software packages for syntax coloring. See TracSyntaxColoring for more info.'' 100 108 … … 107 115 }}} 108 116 109 The result will be syntax highlighted HTML code. The same is valid for all other mime types supported. 117 The result will be syntax highlighted HTML code: 118 {{{ 119 #!text/html 120 <h1>text</h1> 121 }}} 122 123 The same is valid for all other mime types supported. 110 124 111 125 112 126 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] 127 * [trac:ProcessorBazaar] 128 * [trac:MacroBazaar] 129 * [th:WikiStart Trac Hacks] community site 115 130 116 131 117 132 == Advanced Topics: Developing Processor Macros == 118 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.133 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. 119 134 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 135 130 136 ----