JVCL Help: TJvRichEditToHtml.ConvertToHtmlStrings Method (TJvRichEdit, TStrings)
- Project summary
Search in JVCL HelpSearch in all projects
Converts the contents of the specified rich edit control to HTML.
procedureConvertToHtmlStrings(Value: TJvRichEdit; Strings: TStrings); overload;
|Value: TJvRichEdit||Rich edit with content to convert to HTML.|
|Strings: TStrings||Stores the HTML created by the method.|
ConvertToHtmlStrings is an overloaded method used to convert the contents of the TJvRichEdit control specified in Value to HTML.
HTML created in the method from the contents of the rich edit control is stored in the Strings argument. Strings is cleared prior to converting the RTF contents of the control and generating the HTML output.
Strings will contain a complete HTML document that includes the contents from the Header property, the converted RTF contents of Value, and the Footer property. Each occurrence of the <#TITLE> tag in the lines of the Header property are replaced with the value from the Title property.
ConvertToHtmlStrings uses instances of TJvRichEditParaAttributesRec to maintain the default, starting, and current paragraph attributes when processing the RTF content in the rich edit control. Each line in the rich edit control is processed to detect changes to font and paragraph attributes in the RTF content for the specified rich edit control, and converts the RTF markup to the equivalent HTML markup.
RTF font attributes handled during conversion include:
- Font Family (or Face)
RTF paragraph attributes handled during conversion include:
Font attributes are indicated using the and HTML tags. The FONT tag will include Color, Face, and Size attributes.
Paragraph breaks are indicated by the
Paragraph alignment is indicated by using an ALIGN attribute in the
HTML tag. For example:
ALIGN="LEFT"The rain in Spain...
ALIGN="RIGHT"The rain in Spain...
ALIGN="CENTER"The rain in Spain...
Font styles are indicated in the HTML output using the following markup:
Bullet numbering style is indicated in the HTML output by wrapping the content in list item tags. For example:
This is an Item
This is another Item
This is the final Item
Please note that ConvertToHtmlStrings does not attempt to convert tabs, tables, images, or other advanced RTF markup instructions.
ConvertToHtmlStrings is used in the ConvertToHtml method which stores the HTML output in a specified file.
Contribute to this help topic
This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page