Enriched To Html Class
Definition
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
public class EnrichedToHtml : TextConverter- Inheritance
- Object TextConverter EnrichedToHtml
Remarks
Converts RFC 1896 text/enriched into HTML with character formatting, font families, colors, relative font sizes, alignment, paragraph indentation, excerpts and language attributes. This does not interpret the older text/richtext format.
Unknown commands and invalid parameters are ignored, but their text is retained. Parameter content is never displayed. Unmatched end commands are ignored; mismatched end commands close intervening commands, and unclosed commands are closed at end of input. Invalid command syntax is treated as literal text.
Font sizes change in steps of one sixth of the base size, bounded between one sixth and twelve times that size. Indentation uses four-character steps. Font family parameters accept letters, digits, spaces, hyphens, underscores and periods; other names are ignored.
CRLF, LF and CR line endings are accepted. Outside nofill, a single line ending becomes a space and N consecutive line endings become N-1 line breaks. Inside nofill, every line ending is retained. HTML paragraphs preserve spaces and tabs.
Input text is HTML-escaped and formatting parameters are validated before use. No external resources are fetched and no links are generated from body text. Headers and footers explicitly marked as HTML are trusted caller-supplied markup, not sanitized input.
Constructors
| EnrichedToHtml | Initialize a new instance of the EnrichedToHtml class. |
Properties
| DetectEncodingFromByteOrderMark |
Get or set whether the encoding of the input is detected from the byte order mark or
determined by the InputEncoding property.
(Inherited from TextConverter) |
| Footer |
Get or set the text that will be appended to the end of the output.
(Inherited from TextConverter) |
| FooterFormat | Get or set the footer format. |
| Header |
Get or set text that will be prepended to the beginning of the output.
(Inherited from TextConverter) |
| HeaderFormat | Get or set the header format. |
| InputEncoding |
Get or set the input encoding.
(Inherited from TextConverter) |
| InputFormat |
Get the input format.
(Overrides TextConverterInputFormat) |
| InputStreamBufferSize |
Get or set the size of the input stream buffer.
(Inherited from TextConverter) |
| MaxElementDepth | Get or set the maximum command nesting depth. |
| MaxInputLength | Get or set the maximum input length. |
| MaxOutputLength | Get or set the maximum output length. |
| MaxParameterLength | Get or set the maximum parameter length. |
| OutputEncoding |
Get or set the output encoding.
(Inherited from TextConverter) |
| OutputFormat |
Get the output format.
(Overrides TextConverterOutputFormat) |
| OutputHtmlFragment | Get or set whether to output only an HTML fragment. |
| OutputStreamBufferSize |
Get or set the size of the output stream buffer.
(Inherited from TextConverter) |
Methods
| Convert(String) |
Convert text from the InputFormat to the OutputFormat.
(Inherited from TextConverter) |
| Convert(Stream, Stream) |
Convert the contents of source from the InputFormat to the
OutputFormat and writes the resulting text to destination.
(Inherited from TextConverter) |
| Convert(Stream, TextWriter) |
Convert the contents of source from the InputFormat to the
OutputFormat and uses the writer to write the resulting text.
(Inherited from TextConverter) |
| Convert(TextReader, TextWriter) |
Convert enriched text to HTML.
(Overrides TextConverterConvert(TextReader, TextWriter)) |
| Convert(TextReader, Stream) |
Convert the contents of reader from the InputFormat to the
OutputFormat and writes the resulting text to destination.
(Inherited from TextConverter) |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |