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: Stringof object;

 

property OnSaveHTMLExtra: TRVSaveHTMLExtraEvent;

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. This is a Unicode string for Delphi/C++Builder 2009 or newer, and ANSI string for the older versions of Delphi/C++Builder.

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: String);

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="http://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