JVCL Help:TJvRichEditToHtml.ConvertToHtmlStrings@TRichEdit@TStrings

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Converts the contents of the specified rich edit control to HTML.


Pascal

 procedureConvertToHtmlStrings(Value: TRichEdit; Strings: TStrings); overload;


Parameters

Parameters Description
Value: TRichEdit Rich edit with content to convert to HTML.
Strings: TStrings Stores the HTML created by the method.


Description

ConvertToHtmlStrings is an overloaded method used to convert the contents of the TRichEdit 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 TJvParaAttributesRec 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)
  • Size
  • Color

RTF paragraph attributes handled during conversion include:

  • Alignment
  • Numbering
  • Bullets
  • Bold
  • Italic
  • Strikeout
  • Underline

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
HTML tag.

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:

Attribute Markup
Bold
Italic
Strikeout
Underline


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.

    See Also

    TJvRichEditToHtml.ConvertToHtmlStrings, TJvRichEditToHtml.ConvertToHtml, TJvParaAttributesRec


    About

    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