|
TCustomRichView.SaveHTMLEx |
Top Previous Next |
|
Exports TRichView document to HTML or XHTML file, using CSS (Cascading Style Sheets) function SaveHTMLEx(const FileName, Title, ImagesPrefix, ExtraStyles, ExternalCSS, CPPrefix: String; Options: TRVSaveOptions): Boolean; This method saves HTML file and a set of images (in separate files). Parameters: FileName –- the name of the output HTML file. Title –- the title of the output HTML file. ImagesPrefix –- the first part of names of images that will be saved with HTML document; ExtraStyles –- strings that can contain additional entries of CSS (usually you need not to use it, set to ''). ExternalCSS –- if this string is not empty, this method uses external CSS (saved with RichView.Style.SaveCSS) instead of saving CSS into HTML file). CPPrefix –- first part of checkpoints names when saving to HTML; set to '' for using default names ('RichViewCheckPoint'). This parameter is not used, if rvsoUseCheckpointsNames is in Options. Options – options for saving, see TRVSaveOptions for possible values. By default, inserted controls and hypertext links are not saved. You can save them yourself using OnSaveComponentToFile and OnWriteHyperlink events. You can: ▪completely change HTML code for certain items using OnSaveItemToFile event; ▪insert additional code in HTML in OnSaveHTMLExtra and OnSaveParaToHTML events; ▪change how images are saved using OnHTMLSaveImage or OnSaveImage2 event, ▪insert HTML codes in text.
Since v1.9, the resulting HTML conforms "HTML 4.01 Transitional" standard, see http://validator.w3.org/. Two issues may cause the validator's warnings: ▪HTML encoding is written in HTML only if Charset of the 0-th text style <> DEFAULT_CHARSET; ▪non-standard <TABLE bordercolor> attribute is saved for MS Internet Explorer.
Return value: "successful saving?"
See also methods: ▪SaveHTML; See also events: See also: ▪TFontInfo.Options (HTML codes); ▪RichViewSaveDivInHTMLEx typed constant; |