04 MIDAS CLASSES/GeniiRTChunk

GenerateHTML method
Version added: 2.21
Converts the specified chunk into HTML controlled by the various arguments and properties, and returns the result as a text stream. Result can be  complete, compliant, well formed  HTML or XHTML, or it can be a compliant fragment of HTML or XHTML that can be embedded in an HTML or XHTML result from elsewhere.  Ideal for use with agents generating HTML rapidly and completely but needing to incorporate rich text fields in the results.  Please note that style mappings created through the  SetStyleMapping method will also effect HTML and XHTML generation.  The  ClearStyleMappings method can be called to eliminate previously created style mappings.
Defined in
GeniiRTChunk class
Syntax
text geniiRTChunk .GenerateHTML( subdefinition   [ html_type    [ properties ]] )
Parameters
subdefinition
String.   Optional.  The definition of the subchunk, or "" if the whole chunk should be used.
html_type
String.   Optional.  Currently "HTML" and XHTML are the only valid options, but in future versions the default may change.   HTML refers to compliant HTML 4.01, while XHTML refers to compliant XHTML 1.0.
properties
String.   Optional.  Properties which control the generation of the HTML are defined in the document  Working with HTML generation .  In addition, there is a property called OutputToEvent which can be set to "Yes" or "No".  If it is set to " No" or not set at all, the return value for the GenerateHTML call will be all of the HTML generated concatenated together.  If the size is greater than 64KB, the result will be truncated.   If the OutputToEvent property is set to "Yes", an  ActOnText event will be triggered for each 8000 characters (roughly), and all limits on the size of the HTML to be generated are removed.
reserved1
String.   Optional.  Should not be included in current version.
reserved2
Variant.   Optional.  Should not be included in current version.

Example