Unit
EmailHilit (add U suffix for Unicode version)
Declaration (partial)
type
TCustomExtHighlighter = class(TPlusHighlighter);
TEmailHighlighter = class(TCustomExtHighlighter);
Description
TEmailHighlighter is a non-visual component to dynamically highlight the text of an email with TPlusMemo, such that quoted parts are highlighted distinctively. The picture below shows the kind of effect that can be achieved:

You can set the highlighting properties of up to four nested quote levels. You can also control which character is used to denote a quote at the start of a paragraph. You can also control whether quoted text is set to non-wrapable state.
To use this component, place a TEmailHighlighter on a form or datamodule, set your TPlusMemo.Highlighter property to that instance. This will result in different quoted text levels being highlighted automatically.
Tip: to have urls highlighted over quoted or non quoted text, set property SubHighlighter to an instance of TUrlHighlighter whose Priority property is set to True.
Key properties
Inherited from TCustomExtHighlighter:
| Active | A Boolean property to control if the component is active or at rest. |
| Keywords | A TExtKeywordList property that defines keywords that are highlighted in addition to quoted text; |
| StartStopKeys | A TExtStartStopList property to define the start-stop keys that are highlighted in addition to quoted text; |
| SubHighlighter | A TPlusHighglighter property to further achieve highlighting provided by another highlighter component. |
Introduced in TEmailHighlighter:
| ContextNum | An integer property that controls the context number attributed to quoted text. |
| QuoteChars | >A string property holding the set of characters that are considered quote characters when found at the start of a paragraph. |
| QuoteLevelx | (x=1 to 4). A set THighlightInfo objects to control highlighting of quoted text, one object for each of the four lower quote levels. |
| UnwrapQuotedText | A boolean property that determines if quoted text is set non wrapable (i.e. quoted parts won't word wrap even if TPlusMemo.WordWrap |
Key events
| OnGetQuoteLevel | An event that you can use to apply custom rules to determine the quote level of individual paragraphs. |