|
Unit RVStyle;
type
TRVSaveOption = (rvsoOverrideImages,
rvsoFirstOnly, rvsoMiddleOnly, rvsoLastOnly,
rvsoDefault0Style, rvsoNoHypertextImageBorders,
rvsoImageSizes, rvsoForceNonTextCSS, rvsoUseCheckpointsNames,
rvsoMarkersAsText, rvsoNoDefCSSStyle, rvsoInlineCSS,
rvsoUseItemImageFileNames,
rvsoXHTML, rvsoUTF8);
TRVSaveOptions = set of TRVSaveOption;
Options for HTML export. Used for parameter of SaveHTML, SaveHTMLEx, SaveHTMLToStream, SaveHTMLToStreamEx.
Options for saving images, both for SaveHTML, SaveHTMLEx
Option
|
Meaning
|
rvsoOverrideImages
|
If set, RichView can override existing images.
If not set, RichView will generate unique names for images.
|
rvsoNoHypertextImageBorders
|
By default, browsers add borders around hypertext images. This option suppresses borders for hotspots and hot-pictures.
|
rvsoImageSizes
|
If set, RichView saves widths and heights of images in HTML explicitly.
This option provides more smooth (and sometimes faster) loading by browsers.
This option does not affect pictures having defined rvepImageWidth and/or rvepImageHeight item extra integer properties. Sizes are always saved for such images.
You can override this setting for the specific item using rveoNoHTMLImagesSize item extra integer properties .
|
rvsoUseItemImageFileNames
|
If included, images with defined (non-empty) file names will not be saved, but their file names will be written in HTML. If this option is included, OnHTMLSaveImage and OnSaveImage2 events have initial value of the Location parameter equal to the image file name.
File names for items are defined via rvespImageFileName string property.
|
Options for saving list markers, both for SaveHTML, SaveHTMLEx
Option
|
Meaning
|
rvsoMarkersAsText
|
If included, paragraph lists are saved as normal text or images. Usually, HTML files saved with this option look closer to the original document.
If not included, lists are saved as <ul> and <ol> HTML tags.
|
If rvsoMarkersAsText is not included
Export using CSS (SaveHTMLEx); CSS of lists are inserted directly in HTML:
▪rvlstBullet, rvlstUnicodeBullet – exported as bullets with default markers (disc, circle or square). FormatString and Font are ignored; ▪rvlstDecimal,rvlstLowerAlpha,rvlstUpperAlpha,rvlstLowerRoman,rvlstUpperRoman – exported as lists with the proper numbering. FormatString and Font are ignored; ▪rvlstPicture,rvlstImageList,rvlstImageListCounter – exported as a bullet with picture. It's possible to change default image saving by OnHTMLSaveImage; ▪indents are saved, but not very accurately. Export without CSS (SaveHTML):
▪rvlstBullet, rvlstUnicodeBullet,rvlstPicture,rvlstImageList – exported as bullets with default markers (disc, circle or square). FormatString, Picture, ImageList and Font are ignored; ▪rvlstDecimal,rvlstLowerAlpha,rvlstUpperAlpha,rvlstLowerRoman,rvlstUpperRoman – exported as lists with the proper numbering. FormatString and Font are ignored; ▪rvlstImageListCounter – saved as a decimal numbering; ▪indents are not saved. If rvsoMarkersAsText is included
Markers are saved without special HTML keywords for lists (like <ol>, <ul>, <li>).
Font and format strings settings are respected.
Saving without CSS (SaveHTML): all indents are ignored.
Saving with CSS (SaveHTMLEx): LeftIndent and MarkerIndent are retained. FirstIndent are retained for non-hanging markers only (MarkerIndent>=LeftIndent)..
Generally, HTML files saved with this option look closer to the original.
Option
|
Meaning
|
rvsoUseCheckpointsNames
|
Checkpoints' names are used instead of checkpoint indices. Recommended.
|
rvsoXHTML
|
If included, XHTML is saved instead of HTML
|
rvsoUTF8
|
If included, Unicode (UTF-8) HTML file is saved. Highly recommended for multilingual documents.
|
rvsoDefault0Style
|
If set, no formatting will be saved for text of the 0-th style (TextStyles[0]).
Browsers will use a default font for it.
This option affects the appearance of all styles, because only attributes different from attributes of the 0th style are saved.
|
Option
|
Meaning
|
rvsoForceNonTextCSS
|
CSS is used for exporting non-text items. This option allows to retain colors of breaks and layout of tables saved with SaveHTML (without using CSS for text and paragraph styles).
Note: SaveHTMLEx always uses CSS in this case.
|
Option
|
Meaning
|
rvsoNoDefCSSStyle
|
By default, SaveHTMLEx assigns attributes of TextStyles[0] to <body> and <table>, and attributes of all other styles are saved relative to attributes of TextStyles[0].
If you include this option, TextStyles[0] will be treated like any other style. The same for ParaStyles[0].
It's not recommended to use this option: it generates much larger CSS and HTML.
This option is useful if HTML generated by TRichView is used as a part of larger HTML, and you do not want to change properties of <body> and <table>.
|
rvsoInlineCSS
|
If included, CSS is inserted directly in <p>, <span> and <li> tags (instead of generating CSS table at the beginning of HTML).
This option generates highly overbloated HTML. Not recommended.
|
Options for saving only part of document, both for SaveHTML, SaveHTMLEx
These options are useful when generating HTML documents what will be inserted in larger HTML document.
Option
|
Meaning
|
rvsoFirstOnly
|
If set, RichView saves only opening part of HTML
(opens <html> tag, saves full <head> tag, opens <body> tag)
|
rvsoMiddleOnly
|
If set, RichView saves only body of HTML document
(content inside <body> tag)
|
rvsoLastOnly
|
If set, RichView saves closing part of HTML document
(closes <body> and <html> tags)
|
If none of these three options specified, full HTML document is saved.
You cannot set two or all of these flags at the same time (nothing will be saved in such case).
|