<< Click to display table of contents >> TRVRTFReaderProperties.TextStyleMode |
Defines a mode for extraction of character formatting from RTF and DocX
property TextStyleMode: TRVReaderStyleMode;
This property defines how RTF/DocX text attributes will be converted to TRichView.Style.TextStyles.
Mode |
Meaning |
rvrsUseSpecified |
All character formatting in RTF/DocX will be ignored, all text will have style specified in TextStyleNo property. |
rvrsUseClosest |
RTF/DocX formatting will be mapped to the the most similar existing text style. |
rvrsAddIfNeeded |
This mode provides the most closer look to the original RTF/DocX. TRichView will try to use existing styles as much as possible, but if a style with the desired formatting does not exist, TRichView will add a new one to the end of the collection of text styles and use it. |
If the both TextStyMode=ParaStyleMode=rvrsAddIfNeeded, and TRichView.UseStyleTemplates=True, and StyleTemplateInsertMode<>rvstimIgnoreSourceStyleTemplates, the RTF/DocX style sheet will be read in TRichView.Style.StyleTemplates. For RTF/DocX loading, the RTF/DocX style sheet replaces existing style templates. For RTF/DocX insertion, the RTF/DocX style sheet is merged into the existing style templates. In this case, RTF/DocX character properties are adjusted according to TRichView.StyleTemplateInsertMode.
Default value:
▪rvrsUseClosest for VCL/LCL components created at runtime.
▪rvrsAddIfNeeded for FireMonkey components created at runtime.
▪For components placed on form at designtime, initial value of this property is defined in the component editor for TRichView. By default, the component editor applies "allow adding styles dynamically" mode to new TRichView components, and this property is set to rvrsAddIfNeeded.
See also: