Skip to main content

Rich Text HTML Specifications

Next Design's rich text fields can be set to multiple formatted values, and the formatted data displayed in the UI is stored in HTML format. However, due to the diverse and complex nature of HTML specifications, there are certain limitations on the HTML handled by rich text fields.

To correctly set HTML format values using rich text-related APIs, use HTML that conforms to the specifications below.
If you edit rich text in the UI and then retrieve the HTML value using the API, an HTML 4.01-compliant value that exceeds the scope of this specification may be returned.

Reference

Overall HTML Structure

Below is the overall structure of rich text HTML. It shows the relationships between elements and attributes that can be handled in Next Design rich text.

Overall Structure Diagram

The following explains the details of the attributes of each element.

Rich Text HTML

Rich text HTML corresponds to the <html> tag.

Attribute NameKeyMultiplicityValue RangeNotes
Header-0..1HeaderThe header content is empty.
If you want to specify a style, specify it for each individual HTML element.
Body-1Body-

Body

The body corresponds to the <body> tag.

Attribute NameKeyMultiplicityRangeNotes
Root Element-1..*Paragraph
List
Table
-

Paragraph

Paragraphs correspond to the <p> tag.

Attribute NameKeyMultiplicityRangeNotes
Paragraph Element-1..*Text Container
Image
-
Stylestyle0..1CSS-formatted string-

Configurable Styles

Setting ItemKeyMultiplicityRangeNotes
Marginmargin0..1Number with px/pt unitIf set in px, it will be converted to pt.
Line heightline-height0..1Unitless number-
Horizontal alignmenttext-align0..1left
center
right
justify
-
Indentationtext-indent0..1Number with px/pt unitIf set in px, it will be converted to pt.

Text container

Text containers correspond to the <span> tag.

Attribute NameKeyMultiplicityValue RangeNotes
Text Container Element-0..*Text Decoration
Line Break
Link
-
Text-0..1String-
Stylestyle0..1CSS-formatted string-

Configurable Styles

Setting ItemKeyMultiplicityValue RangeNotes
Fontfont-family0..1Single font family-
Font Sizefont-size0..1Number with px/pt unitIf set in px, it will be converted to pt.
Text decoration (strikethrough)text-decoration0..1line-through-
Background colorbackground-color0..1RGB hexadecimal color
Color keyword 1
-
Character colorcolor0..1RGB hexadecimal color
Color keyword 1
-

Text decoration

Text decoration corresponds to one of the following tags:

  • Superscript: <sup>
  • Subscript: <sub>
  • Underline: <u>
  • Italics: <i>
  • Bold: <b>
Attribute NameKeyMultiplicityRangeNotes
Text-1String-

Image

Images correspond to the <img> tag.

Attribute NameKeyMultiplicityRangeNotes
Sourcesrc1URL
Local absolute path
base64
-
Widthwidth0..1Unitless numberThe specific width of the image.
Heightheight0..1Unitless numberThe specific height of the image.

base64

The base64 source is specified in the format data:image/{image format};base64,{Base64 string}.

Attribute nameKeyMultiplicityValue rangeNotes
Image Format-1png
jpeg
bmp
-

List

A list corresponds to one of the following tags.

  • Unordered list: <ul>
  • Ordered list: <ol>
Attribute nameKeyMultiplicityRangeNotes
List itemli1..*List item-

List item

List items correspond to the <li> tag.

Attribute NameKeyMultiplicityValue RangeNotes
List-0..*List-
Text Container-1..*Text Container-
Stylestyle0..1CSS-formatted string-

Configurable Styles

Setting ItemKeyMultiplicityValue RangeNotes
Line Heightline-height0..1Unitless number-

Table

Tables correspond to the <table>and<tbody> tags.

Attribute NameKeyMultiplicityValue RangeNotes
Table Row-1..*Table Row-
Stylestyle0..1CSS format string-

Configurable Styles

Setting ItemKeyMultiplicityValue RangeNotes
Widthwidth0..1Number with px/pt unitIf a width is set for the table cell, that setting will be ignored and this setting will be applied.
If set in px, it will be converted to pt.

Table Row

Table rows correspond to the <tr> tag.

Attribute NameKeyMultiplicityRangeNotes
Table Cell-1..*Table Cell-
Stylestyle0..1CSS format string-

Configurable Styles

Setting ItemKeyMultiplicityRangeNotes
Heightheight0..1Number with px/pt unitIf set in px, it will be converted to pt.

Table Cell

Table cells correspond to the <td> tag.

Attribute NameKeyMultiplicityRangeNotes
Block Element-0..*Paragraph
List
-
Column Spancolspan0..1IntegerThe number of cells to span horizontally.
Row Spanrowspan0..1IntegerThe number of cells to span vertically.
Vertical Alignmentvalign0..1top
middle
bottom
-
Stylestyle0..1CSS format string-

Configurable Styles

Setting ItemKeyMultiplicityValue RangeNotes
Top Borderborder-top0..1Width: Numeric value in px/pt
Shape: None, Dotted, Dashed, Solid, Double
Color: RGB hexadecimal notation, Color Keyword1
The three values (width, shape, color) can be specified in any order, but all values must be set.
If the width is set in px, it will be converted to pt.
Left borderborder-left0..1Width: Number with px/pt units
Shape: none, dotted, dashed, solid, double
Color: RGB hexadecimal notation, color keyword1
The three values (width, shape, color) can be specified in any order, but all values must be set.
If the width is set in px, it will be converted to pt.
Bottom borderborder-bottom0..1Width: Number with px/pt units
Shape: none, dotted, dashed, solid, double
Color: RGB hexadecimal notation, color keyword1
The three values (width, shape, color) can be specified in any order, but all values must be set.
If the width is set in px, it will be converted to pt.
Right borderborder-right0..1Width: Numeric value with px/pt units
Shape: none, dotted, dashed, solid, double
Color: RGB hexadecimal notation, color keyword 1
The three values (width, shape, color) can be specified in any order, but all values must be set.
If width is set in px, it will be converted to pt.
Paddingpadding0..1Numeric value with px/pt unitsFour values (top, right, bottom, left) must be specified.
If set in px, it will be converted to pt.
Background colorbackground-color0..1Color with RGB hexadecimal notation
Color keyword 1
-
Widthwidth0..1Numeric value with px/pt unitsIf a table width is set, that value will be applied and this setting will be ignored.
If set in px, it will be converted to pt.

Links correspond to the <a> tag.

Attribute NameKeyMultiplicityValue RangeNotes
Text-1String-
URLhref1String-

Footnotes

  1. You can specify the desired color using a keyword such as "red". Supports up to CSS Colors Level 3. 2 3 4 5 6 7