RichEditControl.HtmlText Property
Gets or sets the control’s content as HTML text.
Namespace: DevExpress.XtraRichEdit
Assembly: DevExpress.XtraRichEdit.v18.2.dll
Declaration
Property Value
Type | Description |
---|---|
String | A string containing text in HTML format. |
Remarks
The HtmlText property returns the HTML document with images which are base64-encoded and embedded in the document body. This is the default behavior.
To get HTML source that contains image references, use the SubDocument.GetHtmlText method. You should specify a custom UriProvider that provides URI for each image. For example, it allows you to retain the original image URI when a document is loaded and then saved, using the OfficeImage.Uri property. See the How to: Retain the Image URI in HTML Document article for an example of use.
Use the Document.HtmlText when operating at the document level, or the SubDocument.GetHtmlText, to retrieve a document range in HTML format.
For a list of supported HTML tags see the HTML Tag Support document.
Assigning the HtmlText property value results in a new loaded document that is imported from the HTML format. Check the HtmlText property value when the RichEditControl.DocumentLoaded event handler, i.e. when the document is fully loaded.