rvico TRichView Reference | TRVStyle

TRVStyle.SaveCSS

Top  Previous  Next

Saves text and paragraph styles as CSS (Cascading Style Sheets) file.

type

  TRVSaveCSSOption = (

    rvcssOnlyDifference, rvcssIgnoreLeftAlignment,

    rvcssNoDefCSSStyle, rvcssUTF8, rvcssDefault0Style,

    rvcssMarkersAsText);

  TRVSaveCSSOptions = set of TRVSaveCSSOption;

 

function SaveCSS(const FileName: String;

  Options: TRVSaveCSSOptions): Boolean;

Use this method if you want to save content of TRichView as HTML file (RichView.SaveHTMLEx) with external CSS.

You can save CSS only once and use it for several HTML files (if they are linked to the same or compatible RVStyle components) .

This method allows to reduce size of HTML files.

The following options may be included in the Options parameter.

Option

Meaning

rvcssNoDefCSSStyle

Corresponds to rvsoNoDefCSSStyle in the Options parameters of SaveHTMLEx. It's not recommended to use this option.

rvcssDefault0Style

Properties of TextStyles[0] are not saved. Corresponds to rvsoDefault0Style in the Options parameter of SaveHTMLEx.

rvcssMarkersAsText

Lists will saved as text, so this method creates an additional styles for text bullets.

Corresponds to rvsoMarkersAsText in the Options parameter of SaveHTMLEx.

rvcssUTF8

CSS is saved in UTF-8 encoding.

Please do not use other options.

There are no methods for loading CSS files.

See also:

RichView work with HTML files.


TRichView © trichview.com