Back to Devexpress

HTML Support in Rich Text Editor

aspnet-119045-components-rich-text-editor-document-management-html-support.md

latest5.2 KB
Original Source

HTML Support in Rich Text Editor

  • Nov 16, 2021
  • 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.
TagAttributeInterpretation
AUnderlined blue text.
BBold text.
BasehrefSpecifies the absolute URI that serves as the base URI to resolve a relative URI.
BaseFontSizeSpecifies font size.
ColorSpecifies font color.
FaceSpecifies font name.
BigSuggests bigger font size.
BlockquoteIndented section of text (left and right indents are about 40 pixels wide).
BrLine feed.
CenterCenter aligns the content within container.
CodeSpecifies the font “Courier New”, font size 10pt.
FontSizeSpecifies font size.
ColorSpecifies font color.
FaceSpecifies font name.
H1-H6Specifies bold text with the font size equal to that of the heading style.
alignSpecifies the alignment of the heading.
Head
Html
IItalic text.
ImgsrcLocation of inline image (URI).
heightImage height.
widthImage width.
LiDefines the list item.
typeSpecifies the type of the list item marker.
valueSpecifies the start value for list numbering. The following list element in the same list will take its default sequence number, based on this attribute.
LinkDefines the external document relationship.
hrefSpecifies the location of the external file (URI).
typeOnly Text/CSS type links are currently processed
mediaOnly the <screen> attribute value, defining media for non-paged computer screens, is currently processed.
MetaOnly the <meta charset> attribute which sets the character encoding is currently processed.
OlDefines an ordered list.
typeSpecifies the numbering style.
valueSpecifies the starting number for the list.
PDefines a paragraph.
alignSpecifies the horizontal alignment for the content of the paragraph.
ScriptText inside this tag is ignored.
SmallSuggests smaller font size.
SpanCombined with the style sheet, specifies formatting of the text within the tag.
StrikeStrike-through text.
StrongBold text.
StyleSpecifies document styles.
SubSubscript.
SupSuperscript.
TableDefines a table.
TablealignSpecifies table alignment.
TablebgcolorSpecifies shading.
TableborderSpecifies border width.
TablebordercolorSpecifies border color.
TablecellpaddingSpecifies inner cell margins.
TablecellspacingSpecifies cell spacing.
TablecolsSpecifies column count.
TablewidthSpecifies table width.
TDDefines a table cell.
TDalignSpecifies horizontal alignment for cell contents.
TDbgcolorSpecifies shading.
TDbordercolorSpecifies border color.
TDcolspanSpecifies the number of columns a cell should span.
TDheightSpecifies the height of a cell.
TDnowrapSets the TableCellPropertiesBase.NoWrap property. The attribute is interpreted differently in HTML browser and in RichEditControl.
TDrowspanSpecifies the number of rows a cell should span
TDvalignSpecifies vertical alignment for cell contents.
TDwidthSpecifies the width of a cell
THDefines a table cell with bold text and center aligned contents
TH(any allowed)The same as for the <TD> tag
TRDefines a row in a table
TRalignSpecifies horizontal alignment for cells in a row.
TRbgcolorSpecifies shading.
TRbordercolorSpecifies border color.
TRheightSpecifies the height of a row.
TRvalignSpecifies vertical alignment for cells in a row.
TitleText inside this tag is ignored.
UUnderlined text.
UlDefines bulleted list.
TypeSpecifies the bullet style.

Unsupported Tags

TagAttribute
HR
DIVborder
DIVpage-break-before, page-break-after, page-break-inside
DIVbackground-color
TDnowrap
!important
DIVtext-align: justify
DIVstyle=”padding”
TABLEstyle=”padding”
Tags of CSS3 Shapes
LIstyle=”list-style-image”
LIstyle=”list-style-type”
TAB