rvico TRichView Reference | TRVStyle


Top  Previous  Next

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


  TRVSaveCSSOption = (

    rvcssOnlyDifference, rvcssIgnoreLeftAlignment,

    rvcssNoDefCSSStyle, rvcssUTF8, rvcssDefault0Style,


  TRVSaveCSSOptions = set of TRVSaveCSSOption;


function SaveCSS(const FileName: TRVUnicodeString;

  Options: TRVSaveCSSOptions): Boolean;

(changed in version 18)

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.




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


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


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

Corresponds to rvsoMarkersAsText in the Options parameter of SaveHTMLEx.


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