RtfToHtmlMaxElementDepth Property

Get or set the maximum element depth of encapsulated HTML.

Definition

Namespace: MimeKit.Text
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
C#
public int MaxElementDepth { get; set; }

Property Value

Int32
The maximum element depth.

Remarks

Gets or sets the maximum number of distinct nested elements that will be tracked while tokenizing HTML extracted from the RTF (see MaxElementDepth).

This only applies when ExtractEncapsulatedHtml is and the document encapsulates HTML. Consecutive nested elements that are identical share a single entry, so arbitrarily deep nesting of the same element does not count towards this limit. If a start tag exceeds this limit, then it is the last tag passed to the HtmlTagCallback and the remainder of the extracted HTML is written to the output as encoded text.

Exceptions

ArgumentOutOfRangeException value is less than 1.

See Also