Rtf To Html Attachment Placeholder Callback Delegate
Definition
Assembly: MimeKit.Core (in MimeKit.Core.dll) Version: 5.0.0
public delegate void RtfToHtmlAttachmentPlaceholderCallback(
int index,
HtmlWriter htmlWriter
)Parameters
- index Int32
- The zero-based index of the placeholder.
- htmlWriter HtmlWriter
- The HTML writer.
Remarks
The RtfToHtmlAttachmentPlaceholderCallback delegate is called by RtfToHtml for each \objattph control word that it renders. Microsoft Outlook and Exchange use \objattph to mark the location in an RTF message body at which each of the message's attachments is rendered, as described by [MS-OXRTFEX] section 2.2.3.4.
The placeholders are numbered from 0 in document order. [MS-OXRTFEX] matches them, in order, with the message's attachments that are not hidden and whose rendering position is not 0xFFFFFFFF, sorted by rendering position. If the number of placeholders does not match the number of those attachments, the placeholders SHOULD be ignored and the attachments appended to the end of the body instead.
The callback may write markup (for example, an <img> element that refers to the attachment using a cid: URL) to the htmlWriter, or nothing at all.