|
TCustomRichView.OnSaveParaToHTML |
Top Previous Next |
|
Allows to add your HTML code when saving paragraphs to HTML. property OnSaveParaToHTML: TRVSaveParaToHTMLEvent
TRVSaveParaToHTMLEvent = procedure (Sender: TCustomRichView; RVData: TCustomRVData; ItemNo: Integer; ParaStart, CSSVersion: Boolean; var HTMLCode: String) of object; (introduced in v1.8) Input parameters: ParaStart:
RVData, ItemNo define the location. if ParaStart=True, ItemNo is an index of the first paragraph item (in RVData). If False, it is an index of the first item of the next paragraph (or RVData.ItemCount for the last paragraph). RVData can be Sender.RVData, or table cell, or cell inplace editor's RVData. Output parameters: HTMLCode – output string.
Example: each paragraph in its own table procedure TMyForm.MyRichViewSaveParaToHTML(Sender: TCustomRichView; RVData: TCustomRVData; ItemNo: Integer; ParaStart, CSSVersion: Boolean; var HTMLCode: String); begin if ParaStart then HTMLCode := '<table border=1 width=100%><tr><td>' else HTMLCode := '</td></tr></table>' end; This event is public, so you need to assign its handler in code at run time.
See also: |