In
TiddlyWeb a renderer is a code system that takes a
tiddler as input and returns an HTML form. It is used by the HTML
serializer to generate the HTML content, usually turning wikitext syntax into HTML with a wikitext renderer, such as
WikklyText. This functionality was originally fully in the serializer, but it became clear with use that being able to support multiple syntaxes would be useful.
Two
config items control how wikitext in tiddlers is rendered. They are
wikitext_renderer and
wikitext_render_map.
If the HTML form of a tiddler is requested
and the
type attribute on the tiddler is not set its content will be rendered by the default
wikitext_renderer. In the default installation
wikklytextrender is used. If the
tiddlywebwiki package has not been installed, the the
raw renderer is used, wrapping HTML escaped content in
<pre> tags.
If the HTML form of a tiddler is requested
and the
type attribute begins with
text/ and the
type attribute is present as a key in
wikitext_render_map the value in the map is used to identify the module which contains the
render() method for that type.