Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Getting Started
   [Collapse]Concepts
     ASPxRichEdit Control
    [Collapse]Document
     [Collapse]Document Model
       Sub-Document
       Text Content (Text Buffer)
       Characters
       Paragraphs
       Inline Pictures
       Hyperlinks and Bookmarks
       Tables
       Sections
       Headers and Footers
       Document Fields
       Floating Objects
       Document Protection
      Document Layout
     Supported Document Formats
     Import and Export
     Formatting Characters
     Formatting Paragraphs
    [Expand]Fields
     Mail Merge
     Restrictions
     Spell Checking
    [Expand]Client API
    [Expand]Built-in Dialogs
     Adaptivity
     HTML Tag Interpretation
     Keyboard Shortcuts
   [Expand]Examples
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Characters

Expanded Overview

A textual content of a sub-document is represented by a set of characters maintained by the sub-document's text buffer. Groups of characters with a uniform format inside a paragraph form text runs.

Note

A run is an internal entity, not available using API; however, it may be useful to understand how text buffer parts are logically organized depending upon the applied text formatting.

Expanded Character Properties

All characters inside a run have a common set of formatting properties defined. Characters can be formatted using specific settings for font, font size, character style - bold, italics, underlined, strike-through; and different colors for background and foreground. Information about character formatting is exposed by client API through the properties of the FontFormattingSettings client object. This object is used in the changeFontFormatting client command (RichEditCommands.changeFontFormatting): in its execute method's parameter and in the getState method's return value.

Expanded Client API

The following client commands are available for applying character formatting directly to the text. Call the commands in the notation given below.
clientRichEditName.commands.commandName.execute(parameter_if_any)

Command Name Link Description
capitalizeEachWordTextCase RichEditCommands.capitalizeEachWordTextCase Gets a command to capitalize each word in the selected sentence.
changeFontBackColor RichEditCommands.changeFontBackColor Gets a command to change the background color of characters in a selected range.
changeFontBold RichEditCommands.changeFontBold Gets a command to change the bold formatting of characters in a selected range.
changeFontForeColor RichEditCommands.changeFontForeColor Gets a command to change the font color of characters in a selected range.
changeFontFormatting RichEditCommands.changeFontFormatting Gets a command to change the font formatting of characters in a selected range.
changeFontItalic RichEditCommands.changeFontItalic Gets a command to change the italic formatting of characters in a selected range.
changeFontName RichEditCommands.changeFontName Gets a command to change the font name of characters in a selected range.
changeFontSize RichEditCommands.changeFontSize Gets a command to change the font size (in points) of characters in a selected range.
changeFontStrikeout RichEditCommands.changeFontStrikeout Gets a command to change the strikeout formatting of characters in a selected range.
changeFontSubscript RichEditCommands.changeFontSubscript Gets a command to change the subscript formatting of characters in a selected range.
changeFontSuperscript RichEditCommands.changeFontSuperscript Gets a command to change the superscript formatting of characters in a selected range.
changeFontUnderline RichEditCommands.changeFontUnderline Gets a command to change the underline formatting of characters in a selected range.
clearFormatting RichEditCommands.clearFormatting Gets a command to reset textual and paragraph formatting in the selected range to default values.
decreaseFontSize RichEditCommands.decreaseFontSize Gets a command to decrease the selected range's font size to the closest smaller predefined value (in points).
increaseFontSize RichEditCommands.increaseFontSize Gets a command to increase the font size of characters in a selected range to the closest larger predefined value (in points).
makeTextLowerCase RichEditCommands.makeTextLowerCase Gets a command to convert selected text to lower case.
makeTextSentenceCase RichEditCommands.makeTextSentenceCase Gets a command changing all selected text to the sentence case capitalization.
makeTextUpperCase RichEditCommands.makeTextUpperCase Gets a command to convert selected text to upper case.
openFontFormattingDialog RichEditCommands.openFontFormattingDialog Gets a command to invoke the Font dialog window.
switchTextCase RichEditCommands.switchTextCase Gets a command to switch the text capitalization in the selection.
toggleTextCase RichEditCommands.toggleTextCase Gets a command to toggle case for each character - upper case becomes lower, lower case becomes upper.

Expanded Character Styles

To uniformly format multiple separate text intervals, a character style can be used. A character style is a detached container of specific character formatting settings. It allows you to apply a similar format to all required text intervals at once.

Note

If some text formatting property (for example, bold) is set directly within the text as a character property, style formatting is not applied to this setting (the style property setting does not override the explicitly defined character property setting). To reset character formatting, use the RichEditCommands.clearFormatting client command.

Expanded Client API

A list of character styles can be accessed using the following characterStylesInfo property in the notation given below.
clientRichEditName.document.characterStylesInfo

Property Name Link Description
characterStylesInfo RichEditDocument.characterStylesInfo Provides information about character styles in the current document.

To apply a character style to the text, use the following changeStyle client command in the notation given below.
clientRichEditName.commands.changeStyle(parameter_if_any)

Command Name Link Description
changeStyle RichEditCommands.changeStyle Gets a command to apply a character or paragraph style settings to text in a selected range.

There is a number of ribbon commands to help you with character formatting. For more information, see the Formatting Characters topic.

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