officefileapi-devexpress-dot-xtrarichedit-dot-documentformat-83669ee7.md
The plain text format.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public static readonly DocumentFormat PlainText
Public Shared ReadOnly PlainText As DocumentFormat
| Type | Description |
|---|---|
| DocumentFormat |
A document format.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the PlainText field.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
word-document-api-automatic-document-conversion-on-web-server/CS/Program.cs#L48
dictF.Add(DocumentFormat.Rtf, "rtf");
dictF.Add(DocumentFormat.PlainText, "txt");
dictF.Add(DocumentFormat.Doc, "doc");
string path = "MainWindow.xaml.cs";
richEditControl1.LoadDocument(path, DocumentFormat.PlainText);
}
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Range.cs#L67
document.Copy(myRange);
document.Paste(DocumentFormat.PlainText);
#endregion #CopyAndPasteRange
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/RangeActions.cs#L67
document.Copy(myRange);
document.Paste(DocumentFormat.PlainText);
#endregion #CopyAndPasteRange
word-document-api-examples/CS/CodeExamples/ImportActions.cs#L41
// Specify the encoding before plain text is imported to the document.
if (e.DocumentFormat == DocumentFormat.PlainText)
{
word-document-api-automatic-document-conversion-on-web-server/VB/Program.vb#L43
dictF.Add(DocumentFormat.Rtf, "rtf")
dictF.Add(DocumentFormat.PlainText, "txt")
dictF.Add(DocumentFormat.Doc, "doc")
Dim path As String = "MainWindow.xaml.cs"
Me.richEditControl1.LoadDocument(path, DocumentFormat.PlainText)
End Sub
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Range.vb#L62
document.Copy(myRange)
document.Paste(DevExpress.XtraRichEdit.DocumentFormat.PlainText)
#End Region ' #CopyAndPasteRange
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/RangeActions.vb#L60
document.Copy(myRange)
document.Paste(DocumentFormat.PlainText)
' #End Region ' #CopyAndPasteRange
word-document-api-examples/VB/CodeExamples/ImportActions.vb#L39
' Specify the encoding before plain text is imported to the document.
If e.DocumentFormat = DevExpress.XtraRichEdit.DocumentFormat.PlainText Then
CType(e.Options, DevExpress.XtraRichEdit.Import.PlainTextDocumentImporterOptions).Encoding = System.Text.Encoding.GetEncoding(20866)
See Also