Skip to content

IExportContent

Dustin Horne edited this page Mar 5, 2026 · 1 revision

IExportContent

Namespace: ParentElement.RichText.Core.Abstractions.IO

Contract for exporting a document to an external format. Implemented by ExporterBase and its concrete subclass RtfExporter.

public interface IExportContent

Methods

Method Returns Description
ExportAsync(IDocumentController, Stream) Task Export the document and write the result to an output stream
ExportAsync(IDocumentController, string) Task Export the document and write the result to a file path

Usage

IExportContent exporter = new RtfExporter();

// Export to a file
await exporter.ExportAsync(editor, @"C:\Documents\report.rtf");

// Export to a memory stream
using var ms = new MemoryStream();
await exporter.ExportAsync(editor, ms);
byte[] rtfBytes = ms.ToArray();

See also: IImportContent · IO · IDocumentController

Clone this wiki locally