TCustomRichView.OnSaveHTMLExtra

<< Click to display table of contents >>

TCustomRichView.OnSaveHTMLExtra

Allows saving additional information in HTML.

type

  TRVHTMLSaveArea = (

    rv_thms_Head, rv_thms_BodyAttribute,

    rv_thms_Body, rv_thms_End);

  TRVSaveHTMLExtraEvent = procedure (

    Sender: TCustomRichView; Area: TRVHTMLSaveArea; 

    CSSVersion: Boolean; 

    var HTMLCode: TRVUnicodeStringof object;

 

property OnSaveHTMLExtra: TRVSaveHTMLExtraEvent;

(changed in version 18)

This event occurs when saving HTML.

If HTMLSaveProperties.HTMLSavingType = rvhtmlstNormal, CSSVersion parameter = True.

If HTMLSaveProperties.HTMLSavingType = rvhtmlstSimplified, CSSVersion parameter = False.

Text assigned to HTMLCode parameter will be saved in HTML.

Area can be:

Area

HTMLCode is inserted...

rv_thms_Head

between <head> and </head>

rv_thms_BodyAttribute

between <body and >

rv_thms_Body

just after <body>

rv_thms_End

just before </body>

Example

procedure TMyForm.MyRichViewSaveHTMLExtra(

  Sender: TCustomRichView; Area: TRVHTMLSaveArea;

  CSSVersion: Boolean; var HTMLCode: TRVUnicodeString);

begin

  case Area of

  rv_thms_Head:

    HTMLCode := '<script></script>';

  rv_thms_BodyAttribute:

    HTMLCode := 'alink=#ff0000';

  rv_thms_Body:

    HTMLCode := '<P>This document is generated by '+

    '<A href="https://www.trichview.com">RichView</A></P>';

  end;

end;

Note: TRVHTMLSaveArea is defined in RVStyle.pas.

 

See also events:

OnHTMLSaveImage;

OnSaveImage2;

OnSaveParaToHTML;

OnSaveRTFExtra;

OnSaveDocXExtra.

See also:

Export to HTML.