[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    AutoCorrect
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
   [Expand]Visual Elements
    Services
    Events
    Commands
    HTML Tag Support
   [Expand]Examples
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Rich Text Editor

Overview

The Rich Text Edit control is a powerful word-processing tool that allows you to create, load, modify, print, save and convert rich text documents in different formats. The RichEditControl processes text with any text direction. The DXRichEdit provides numerous features, such as importing and exporting options, multiple predefined document layouts, conversion between different measurement units, field support, etc.

To get started with the Rich Text Editor and create simple word processing applications in MS Visual Studio, follow the Getting Started tutorial. Look through the Examples section to learn how to accomplish different tasks using the Rich Text Editor API. Check the Product Class Structure topic to access reference information on major Rich Editor classes.

Document Elements

A document created by the Rich Text Editor consists of elements visible to end-users. They vary from the simplest objects forming the text, to more complex ones that can contain other elements. These are:

  • Characters

    Simple objects that build regular plain text.

  • Paragraphs

    Portions of text organized by a specific collection of characters.

  • Fields

    Placeholders added to a document, providing a mechanism to replace them with corresponding values when the document is rendered for display or print. Fields can be used to perform a variety of operations, including creating a Table of Contents and mail merging.

  • Lists

    Linearly organized paragraphs. You can group any paragraph into a bulleted, numbered or multilevel list in code or with the UI.

  • Tables

    A paragraph formatted in aligned rows and columns. The RichEdit control provides support for complex tables, as well as nested ones. Tables can be added, deleted and modified in code or in the UI.

  • Inline Pictures

    Images presented in the text stream. The picture can be inserted within the text (the text wrapping is optional), behind or above it. Different image formats are supported.

  • Shapes

    Drawing objects that are strictly positioned, absolutely or relatively within the document, regardless of the text flow. It includes text boxes that are shapes containing editable text strings. All drawing objects can be moved, resized and rotated.

  • Comments

    Notes that can be added to a document. They are also strictly positioned and can contain a text string or image. Comments can make a document more understandable by providing additional context for the data it contains.

  • Hyperlinks and Bookmarks

    Elements that allow you to quickly navigate to the specific place within a document (bookmarks,to point to an existing file or web page, or to mark the specific document range (hyperlinks).

  • Checkboxes

    Interactive form fields which allow you to create fillable forms.

Views

The Rich Text Editor is able to display documents in three different ways depending on the currently applied document View:

  • Similar to the 'Web Layout' view in Microsoft Word, the Simple View does not split the document into pages, so the document has no page width or height, margins, headers or footers. This View is most appropriate for editing simple texts.
  • Same as the Microsoft Word's 'Draft View', the Rich Text Editor Draft View displays documents as a single page without headers or footers, but applies the page width. This View can be used for text formatting.
  • The Print Layout View displays your documents in the same way they will appear on the printed page, with all their headers, footers, margins and columns. Use this View when you need to polish your document and prepare it for printing.

Developer Guidelines

The DXRichEdit carries out various features that allow you to create a powerful and fully customizable text editing application, such as:

  • Commands, which can help you to accomplish different tasks, such as inserting characters and pictures, selection, formatting, creating numbered lists, scrolling, etc.
  • A variety of Events accompanying different processes, which allow you to track end-user actions to perform necessary operations.
  • A comprehensive set of Services exposed by the Rich Edit Control, that enable you to build feature-rich applications.
  • Three types of protection that can be used to restrict an end-user's ability to modify the document, like character or paragraph formatting, clipboard operations or printing.
  • The mail merging feature that can help you to create a document template for letters, catalogs, mailing labels and for personalizing any kind of document.
  • The embedded autocorrection service that analyzes the entered text and automatically fixes errors based on specific rules and permissions.
  • The spell checking feature that allows the Rich Text Editor to highlight words with possible errors that were not fixed by auto correction.

Formatting Documents

Characters can be formatted using different settings for font, font size, character style (bold, italics, underlined, strike-through style) and different colors for background and foreground. You can specify the type of characters you want to highlight with different colors and fonts as they appear in the text.

Each of the document Sections can have its own set of Headers and Footers and settings like page orientation, paper kind or margins. You can design the first page of your document by applying its own layout settings and hiding its header and footer to start numbering from the second page. Formatting paragraph alignment, style or line spacing is also entirely supported.

If there is a table inserted in the document, you can edit its layout by inserting more rows or columns and splitting or merging cells. Borders and shading can be applied individually for each cell in a table. Any image in the document can be resized, moved or rotated. You can change the text wrapping and place the image behind, above or within the text.

To provide a document with quick navigation to each part of the document, you can build a Table of Contents. It can be organized from the entire document or from any part of a text marked with a bookmark.

Is this topic helpful?​​​​​​​