Function: to_html

Function: to_html



Convert a tagged string to HTML code for use in web pages. Characters are correctly escaped for HTML code.

The following tags are converted to html:

Tag Description
<b> Bold
<i> Italic
<sym> Symbols, if the symbol_font parameter is set.

Symbol fonts can only be used in an export template, when create directory is true, as the images of the font are written to the output directory.


Parameter Type Description
input tagged string String to convert to html
symbol_font string (optional) Name of a symbol font to use for images.
symbol_font_size real number (optional) Size in points to use for the symbol font, default 12


 to_html("<b>bold text</b>") == "<b>bold text</b>"
 to_html("<sym>WU</sym>")    == "<img src='data-dir/w.png' alt='W'><img src='data-dir/u.png' alt='U'>"

See also

symbols_to_html Convert text to html using a symbol font.
to_text Remove all tags from tagged text, and convert it to a string.