|
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: String) of 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:
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: See also: |