[Expand]General Information
[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]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Expand]Reporting
  [Expand]Chart Control
  [Expand]Pivot 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 and Printing
     Import and Export
     Formatting Characters
     Formatting Paragraphs
     AutoCorrect
    [Expand]Fields
     Mail Merge
     Table of Contents
     Restrictions
     Spell Checking
    [Expand]Client API
    [Expand]Built-in Dialogs
     Adaptivity
     HTML Tag Interpretation
     Keyboard Shortcuts
   [Expand]Examples
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [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]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Floating Objects

Expanded Overview

The RichEdit allows the floating objects - pictures and text boxes - to be inserted into a document by end-users (via specific UI) or programmatically. Floating means that the object is strictly positioned, absolutely or relatively within the document, regardless of the document text flow. A floating object's anchor (seen in the picture below) specifies the paragraph with which the object is associated and indicates where the floating object is located in relation to the text.

See Online Demo: Floating Objects

Note

The HTML format does not support text wrapping settings. Thus, if an end-user saves a document containing floating objects (images and text boxes) to an HTML file, they are saved as inline images and plain text correspondingly. See the Import and Export topic to learn more information.

Expanded Manage Floating Objects in Code

Expanded Insert a Floating Object

  • Insert a Floating Text Box

    To create a text box anchored to the given document position, use the RichEditCommands.insertFloatingTextBox client command as the following code snippet demonstrates:

    The inserted text box is at the beginning of the first paragraph on the page that contains a floating object's anchor by default.

  • Insert a Floating Picture

    There is no an individual dedicated client command to create floating pictures. To insert a floating picture, do the following:

    1. Insert an in-line picture using the RichEditCommands.insertPicture client command;

    2. Switch the inserted picture's text wrapping (from the default None to any other value) by calling the RichEditCommands.changeFloatingObjectTextWrapping client command.

    Example:

Expanded Receive a Floating Object's information

You can access floating objects stored in the active sub-document and their information using the SubDocument class's API in the following notation:
clientRichEdit.document.activeSubDocument.member_name

  • Floating Text Boxes
    Member Link Description
    floatingTextBoxesInfo SubDocument.floatingTextBoxesInfo Provides information about floating text boxes contained within the sub-document if it is the main sub-document or header/footer.
    getFloatingTextBoxInfo() SubDocument.getFloatingTextBoxInfo Returns information specific for floating text boxes about the sub-document.
  • Floating Pictures
    Member Link Description
    floatingPicturesInfo SubDocument.floatingPicturesInfo Provides information about floating pictures in the sub-document.

Expanded Modify the Selected Floating Object

The following client commands are available for manipulating floating objects programmatically. Call the commands in the notation given below:
clientRichEditName.commands.commandName.execute(parameter_if_any)

Expanded Manipulations Trough UI

End-users are allowed to freely position, scale and rotate all floating objects when inserting pictures or text boxes into a document. They can also modify object characteristics using context menu items, a specific ribbon context tab, or activate the built-in Layout dialog through the context menu.

  • Insert a Text Box

    An end-user can insert a text box object using the Text Box ribbon button located in the ribbon's Insert tab, in the Text group. A selected floating text box's contents can be formatted using the Home ribbon tab.

  • Ribbon Context Tab

    When a floating object is selected, the Format context tab is available in the ribbon. This tab allows end-users to position the floating object within the document and set the shape's fill or border color.

  • Handles to Rotate and Resize

    End-users can rotate and resize a floating object using specially designed handles as shown in the following image. When a floating object rotates, its content is also rotated.

  • Context Menu and the Layout Dialog

    End-users can also modify object characteristics using context menu items, or use the built-in Layout dialog invoked through the context menu to set more advanced options.

Expanded See Also

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