rvico TRichView Reference | TRichView

TCustomRichView.OnSaveHTMLExtra

Top  Previous  Next

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 by methods SaveHTML (with CSSVersion parameter = False) and SaveHTMLEx (with CSSVersion=True).

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 := 'This document is generated by '+

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

  end;

end;

Note: TRVHTMLSaveArea is defined in RVStyle.pas.

 

See also events:

OnHTMLSaveImage;

OnSaveImage2;

OnSaveParaToHTML;

OnSaveRTFExtra;

OnSaveDocXExtra.

See also:

Export to HTML.


TRichView © trichview.com