RichTextEditor
The RichTextEditor control allows users to edit text and apply different formats to different parts of that text. The following formatting options are supported:
- Font family and size
- Font style and weight (italics, bold, underline)
- Foreground color
- Background color
- Bulleted and numbered lists
- Paragraph alignment (left, right, center)
- Hyperlinks
The easiest way to provide these formatting options to your users is using the StandardRichTextEditorToolBar. This provides a user interface for applying all of the above options. Set the Editor property to attach a toolbar to an editor:

<ms:StandardRichTextEditorToolBar Editor="{Binding ElementName=TextEditor}" /> <ms:RichTextEditor x:Name="TextEditor" />
If you want to provide your own user interface for applying formatting, use the various Apply methods on the RichTextEditor control.
Importing and Exporting HTML
To export HTML from the RichTextEditor control, use the Html property. HTML is generated on demand and the Html property is therefore not suitable for use as a binding source (the control does not raise change notifications for it). This reflects the usual pattern of HTML editing where the user chooses when to post or preview their content, for example by clicking a button.
To load HTML into the RichTextEditor control, call the LoadHtml method. LoadHtml does not implement a full HTML parser, and will ignore elements or styles that it does not recognise. You should generally use LoadHtml only to reload HTML that was originally exported from the RichTextEditor via the Html property.

<div id="htmlDisplay" />

private void ShowHtmlOnPage() { HtmlElement element = HtmlPage.Document.GetElementById("htmlDisplay"); if (element != null) { element.SetProperty("innerHTML", TextEditor.Html); } }