Edit this page

Upgrading to RadRichTextEditor

This article explains how to convert your applications that use RadRichTextBox to use the new and improved RadRichTextEditor.

Converting to RadRichTextEditor

In order to convert RadRichTextBox to RadRichTextEditor you should take the following steps:

1. Remove the references to Telerik.WinControls.RichTextBox.dll and then add the one for the new control: Telerik.WinControls.RichTextEditor.dll

2. Replace the RadRichTextBox type with RadRichTextEditor (you can change the name as well)

//old
private RadRichTextBox radRichTextBox1 = new RadRichTextBox();
//new
private RadRichTextEditor radRichTextEditor1 = new RadRichTextEditor();

'old
' Private radRichTextBox1 As New RadRichTextBox()
'new
Private radRichTextEditor1 As New RadRichTextEditor()

3. RadRichTextEditor supports all features that are supported by the RadRichTextBox (and much more). However, some of them may not be at the same place and some compile time errors may occur. The final step is to fix these errors, it can be achieved by finding the new equivalents of the missing properties and methods and replacing them. Should you have any issues finding a property or a method, feel free to submit a support ticket and we will gladly assist you.

important

RadRichTextEditor example provides you with a ribbon UI that can be easily used if you need a fully functional text editor. Detailed information is available here.

Common conversion issues

  • ChangeFontFamily method now takes Telerik.WinControls.RichTextEditor.UI.FontFamily as an argument.

  • The ChangeSectionMargin method is renamed to ChangeSectionPageMargin.

  • The ChangePageSize method is renamed to ChangeSectionPageSize.

  • The ShowInsertHyperlinkDialog method is moved to the control and now it can be used like this:


radRichTextEditor1.ShowInsertHyperlinkDialog();

radRichTextEditor1.ShowInsertHyperlinkDialog()

  • The ShowManageBookmarksDialog now can be used as follows:

radRichTextEditor1.ShowManageBookmarksDialog();

radRichTextEditor1.ShowManageBookmarksDialog()

  • When you are inserting an image it is mandatory to specify the extension:

radRichTextEditor1.InsertImage(stream, extension);

radRichTextEditor1.InsertImage(stream, extension)

  • Now you can insert table by using the built-in dialog rather than using InsertTableForm:

radRichTextEditor1.ShowInsertTableDialog();

radRichTextEditor1.ShowInsertTableDialog()

See Also