Version

Import/Export Plain Text (xamRichTextEditor)

Topic Overview

Purpose

This topic explains how to import and export plain text data using the xamRichTextEditor ™ control.

Required background

The following topic is a prerequisite to understanding this topic:

Topic Purpose

This topic explains the xamRichTextEditor control’s serialization providers.

Import/Export Plain Text Configuration Summary

Import/Export configuration summary chart

The following table briefly explains the configurable aspects of the xamRichTextEditor control and maps them to their respective properties.

Configurable aspect Details Methods

Import plain text content from a stream.

Export plain text content to a stream.

Note
Note

There is also a GetTextInSpan method, which returns the full text of a specific document’s span. You can also specify different settings in the argument of type PlainTextFormatOptions.

Import Plain Text Content

Overview

Use the RichTextDocument’s LoadFromPlainText method to import plain text content in the xamRichTextEditor control from a stream.

Property settings

The following table maps the desired configuration to its respective property settings.

In order to: Use this method: And provide the following arguments:

Import plain text content

LoadFromPlainText

  • The stream object containing the plain text format content

  • Content loading options object of type PlainTextLoadOptions, which is not required

Export Plain Text Content

Overview

Use the SaveToPlainText method of the RichTextDocument to export xamRichTextEditor’s content to a stream in plain text format.

Property settings

The following table maps the desired configuration to its respective property settings.

In order to: Use this method: And provide the following arguments:

Export content in plain text format

SaveToPlainText

  • The stream object into which the plain text content is uploading

  • Content saving options object of type PlainTextSaveOptions, which is not required

Related Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic explains how to use the xamRichTextEditor control for importing and exporting RTF data.

This topic explains how to use the xamRichTextEditor control for importing and exporting DOCX formatted data.