Search code examples
c#devexpressrichtextboxxtraeditors

How to display html text in DevExpress.XtraEditors.RichTextEdit?


I am having DevExpress.XtraEditors.RichTextEdit control in which I want to display html text as readable text. But it show html text as it is with html tag.

How to display html text in DevExpress.XtraEditors.RichTextEdit?


Solution

  • I suggest you use the RepositoryItemRichTextEdit.DocumentFormat property in the following manner:

    richTextEdit.Properties.DocumentFormat = DevExpress.XtraRichEdit.DocumentFormat.Html;
    richTextEdit.Text = htmlString;