Class
HtmlFormatProvider

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

Definition

Namespace:Telerik.Windows.Documents.FormatProviders.Html

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public class HtmlFormatProvider : DocumentFormatProviderBase, IConfigurableHtmlFormatProvider, ITextBasedDocumentFormatProvider, IDocumentFormatProvider

Inheritance: objectDocumentFormatProviderBaseHtmlFormatProvider

Implements: IConfigurableHtmlFormatProviderIDocumentFormatProviderITextBasedDocumentFormatProvider

Inherited Members DocumentFormatProviderBase.Import(byte[])

Constructors

HtmlFormatProvider()

Initializes a new instance of the HtmlFormatProvider class.

Declaration

cs-api-definition
public HtmlFormatProvider()

Properties

CanExport

Gets a value indicating whether this instance can export.

Declaration

cs-api-definition
public override bool CanExport { get; }

Property Value

bool

true if this instance can export; otherwise, false.

Overrides DocumentFormatProviderBase.CanExport

Implements IDocumentFormatProvider.CanExport

CanImport

Gets a value indicating whether this instance can import.

Declaration

cs-api-definition
public override bool CanImport { get; }

Property Value

bool

true if this instance can import; otherwise, false.

Overrides DocumentFormatProviderBase.CanImport

Implements IDocumentFormatProvider.CanImport

ExportSettings

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

Declaration

cs-api-definition
public HtmlExportSettings ExportSettings { get; set; }

Property Value

HtmlExportSettings

The export settings.

Implements IConfigurableHtmlFormatProvider.ExportSettings

FilesDescription

Gets the description of the supported file formats.

Declaration

cs-api-definition
public override string FilesDescription { get; }

Property Value

string

The files description.

Overrides DocumentFormatProviderBase.FilesDescription

Implements IDocumentFormatProvider.FilesDescription

ImportSettings

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

Declaration

cs-api-definition
public HtmlImportSettings ImportSettings { get; set; }

Property Value

HtmlImportSettings

The import settings.

Implements IConfigurableHtmlFormatProvider.ImportSettings

Name

Gets the name of the specific format provider.

Declaration

cs-api-definition
public override string Name { get; }

Property Value

string

The name.

Overrides DocumentFormatProviderBase.Name

Implements IDocumentFormatProvider.Name

SupportedExtensions

Gets the extensions supported by this format provider.

Declaration

cs-api-definition
public override IEnumerable<string> SupportedExtensions { get; }

Property Value

IEnumerable<string>

The supported extensions.

Overrides DocumentFormatProviderBase.SupportedExtensions

Implements IDocumentFormatProvider.SupportedExtensions

Methods

Export(RadDocument)

Exports the specified RadDocument instance to a string.

Declaration

cs-api-definition
public string Export(RadDocument document)

Parameters

document

RadDocument

The document which should be exported.

Returns

string

A string containing the HTML document.

Implements ITextBasedDocumentFormatProvider.Export(RadDocument)

Export(RadDocument, Stream)

Exports the specified RadDocument instance.

Declaration

cs-api-definition
public override void Export(RadDocument document, Stream output)

Parameters

document

RadDocument

The document.

output

Stream

The Stream the document should be saved into.

Overrides DocumentFormatProviderBase.Export(RadDocument, Stream)

Implements IDocumentFormatProvider.Export(RadDocument, Stream)

Import(Stream)

Imports the specified Stream into a RadDocument instance.

Declaration

cs-api-definition
public override RadDocument Import(Stream input)

Parameters

input

Stream

The Stream containing the document data.

Returns

RadDocument

The generated RadDocument instance.

Overrides DocumentFormatProviderBase.Import(Stream)

Implements IDocumentFormatProvider.Import(Stream)

Import(string)

Imports the specified string into a RadDocument instance.

Declaration

cs-api-definition
public RadDocument Import(string input)

Parameters

input

string

The HTML string.

Returns

RadDocument

The generated RadDocument instance.

Implements ITextBasedDocumentFormatProvider.Import(string)