Skip to main content

HTML Support in Rich Text Editor

  • 4 minutes to read

The ASPxRichEdit control does not operate with HTML data directly. Instead, an HTML document is parsed and transformed into an internal document model. Therefore, not every HTML tag can be converted into the corresponding document model element. When exporting a document to HTML, the conversion process runs again, resulting in a document that is different from the original HTML document.

Supported HTML Tags

The table below lists how HTML tags are interpreted when the ASPxRichEdit control imports an HTML source.

  • External links are processed for inline pictures and style sheets (css files).
  • The ID and Class attributes are interpreted for all tags, even for unlisted tags. These attributes are used to specify a style applied to a part of the document defined by a certain tag.
Tag Attribute Interpretation
A Underlined blue text.
B Bold text.
Base href Specifies the absolute URI that serves as the base URI to resolve a relative URI.
BaseFont Size Specifies font size.
Color Specifies font color.
Face Specifies font name.
Big Suggests bigger font size.
Blockquote Indented section of text (left and right indents are about 40 pixels wide).
Br Line feed.
Center Center aligns the content within container.
Code Specifies the font “Courier New”, font size 10pt.
Font Size Specifies font size.
Color Specifies font color.
Face Specifies font name.
H1-H6 Specifies bold text with the font size equal to that of the heading style.
align Specifies the alignment of the heading.
Head
Html
I Italic text.
Img src Location of inline image (URI).
height Image height.
width Image width.
Li Defines the list item.
type Specifies the type of the list item marker.
value Specifies the start value for list numbering. The following list element in the same list will take its default sequence number, based on this attribute.
Link Defines the external document relationship.
href Specifies the location of the external file (URI).
type Only Text/CSS type links are currently processed
media Only the <screen> attribute value, defining media for non-paged computer screens, is currently processed.
Meta Only the <meta charset> attribute which sets the character encoding is currently processed.
Ol Defines an ordered list.
type Specifies the numbering style.
value Specifies the starting number for the list.
P Defines a paragraph.
align Specifies the horizontal alignment for the content of the paragraph.
Script Text inside this tag is ignored.
Small Suggests smaller font size.
Span Combined with the style sheet, specifies formatting of the text within the tag.
Strike Strike-through text.
Strong Bold text.
Style Specifies document styles.
Sub Subscript.
Sup Superscript.
Table Defines a table.
Table align Specifies table alignment.
Table bgcolor Specifies shading.
Table border Specifies border width.
Table bordercolor Specifies border color.
Table cellpadding Specifies inner cell margins.
Table cellspacing Specifies cell spacing.
Table cols Specifies column count.
Table width Specifies table width.
TD Defines a table cell.
TD align Specifies horizontal alignment for cell contents.
TD bgcolor Specifies shading.
TD bordercolor Specifies border color.
TD colspan Specifies the number of columns a cell should span.
TD height Specifies the height of a cell.
TD nowrap Sets the TableCellPropertiesBase.NoWrap property. The attribute is interpreted differently in HTML browser and in RichEditControl.
TD rowspan Specifies the number of rows a cell should span
TD valign Specifies vertical alignment for cell contents.
TD width Specifies the width of a cell
TH Defines a table cell with bold text and center aligned contents
TH (any allowed) The same as for the <TD> tag
TR Defines a row in a table
TR align Specifies horizontal alignment for cells in a row.
TR bgcolor Specifies shading.
TR bordercolor Specifies border color.
TR height Specifies the height of a row.
TR valign Specifies vertical alignment for cells in a row.
Title Text inside this tag is ignored.
U Underlined text.
Ul Defines bulleted list.
Type Specifies the bullet style.

Unsupported Tags

Tag Attribute
HR
DIV border
DIV page-break-before, page-break-after, page-break-inside
DIV background-color
TD nowrap
!important
DIV text-align: justify
DIV style=”padding”
TABLE style=”padding”
Tags of CSS3 Shapes
LI style=”list-style-image”
LI style=”list-style-type”
TAB