New to Telerik UI for WinFormsStart a free 30-day trial

Represents a format provider that can import and export HTML documents from/to RadDocument.

Definition

Namespace:Telerik.WinForms.Documents.FormatProviders.Html

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class HtmlFormatProvider : DocumentFormatProviderBase, IConfigurableHtmlFormatProvider, ITextBasedDocumentFormatProvider, IDocumentFormatProvider

Inheritance: objectDocumentFormatProviderBaseHtmlFormatProvider

Implements: IConfigurableHtmlFormatProviderIDocumentFormatProviderITextBasedDocumentFormatProvider

Inherited Members DocumentFormatProviderBase.Import(byte[])

Constructors

Initializes a new instance of the HtmlFormatProvider class.

C#
public HtmlFormatProvider()

Properties

Gets a value indicating whether this instance can export.

C#
public override bool CanExport { get; }
Property Value:

true if this instance can export; otherwise, false.

Overrides: DocumentFormatProviderBase.CanExport

Implements: IDocumentFormatProvider.CanExport

Gets a value indicating whether this instance can import.

C#
public override bool CanImport { get; }
Property Value:

true if this instance can import; otherwise, false.

Overrides: DocumentFormatProviderBase.CanImport

Implements: IDocumentFormatProvider.CanImport

Gets or sets the settings which will be used while exporting a document.

C#
public HtmlExportSettings ExportSettings { get; set; }
Property Value:

The export settings.

Implements: IConfigurableHtmlFormatProvider.ExportSettings

Gets the description of the supported file formats.

C#
public override string FilesDescription { get; }
Property Value:

The files description.

Overrides: DocumentFormatProviderBase.FilesDescription

Implements: IDocumentFormatProvider.FilesDescription

Gets or sets the settings which will be used while importing a document.

C#
public HtmlImportSettings ImportSettings { get; set; }
Property Value:

The import settings.

Implements: IConfigurableHtmlFormatProvider.ImportSettings

Gets the name of the specific format provider.

C#
public override string Name { get; }
Property Value:

The name.

Overrides: DocumentFormatProviderBase.Name

Implements: IDocumentFormatProvider.Name

Gets the extensions supported by this format provider.

C#
public override IEnumerable<string> SupportedExtensions { get; }
Property Value:

The supported extensions.

Overrides: DocumentFormatProviderBase.SupportedExtensions

Implements: IDocumentFormatProvider.SupportedExtensions

Methods

Exports the specified RadDocument instance.

C#
public override void Export(RadDocument document, Stream output)
Parameters:documentRadDocument

The document.

outputStream

The Stream the document should be saved into.

Overrides: DocumentFormatProviderBase.Export(RadDocument, Stream)

Implements: IDocumentFormatProvider.Export(RadDocument, Stream)

Exports the specified RadDocument instance to a string.

C#
public string Export(RadDocument document)
Parameters:documentRadDocument

The document which should be exported.

Returns:

string

A string containing the HTML document.

Implements: ITextBasedDocumentFormatProvider.Export(RadDocument)

Imports the specified Stream into a RadDocument instance.

C#
public override RadDocument Import(Stream input)
Parameters:inputStream

The Stream containing the document data.

Returns:

RadDocument

The generated RadDocument instance.

Overrides: DocumentFormatProviderBase.Import(Stream)

Implements: IDocumentFormatProvider.Import(Stream)

Imports the specified string into a RadDocument instance.

C#
public RadDocument Import(string input)
Parameters:inputstring

The HTML string.

Returns:

RadDocument

The generated RadDocument instance.

Implements: ITextBasedDocumentFormatProvider.Import(string)